Skip to content

Commit 317f3bd

Browse files
authored
[clang-tidy] Fix formatting and add release notes entry (llvm#141584)
Follow-up to llvm#141092.
1 parent 04f9fac commit 317f3bd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ void registerMatchersForGetArrowStart(MatchFinder *Finder,
6666

6767
// Make sure we are not missing the known standard types.
6868
const auto SmartptrAny = anyOf(knownSmartptr(), QuacksLikeASmartptr);
69-
const auto SmartptrWithDeref =
70-
anyOf(cxxRecordDecl(knownSmartptr(), HasRelevantOps), QuacksLikeASmartptr);
69+
const auto SmartptrWithDeref = anyOf(
70+
cxxRecordDecl(knownSmartptr(), HasRelevantOps), QuacksLikeASmartptr);
7171

7272
// Catch 'ptr.get()->Foo()'
7373
Finder->addMatcher(

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@ Changes in existing checks
249249
<clang-tidy/checks/readability/qualified-auto>` check by adding the option
250250
`AllowedTypes`, that excludes specified types from adding qualifiers.
251251

252+
- Improved :doc:`readability-redundant-smartptr-get
253+
<clang-tidy/checks/readability/redundant-smartptr-get>` check by fixing
254+
some false positives involving smart pointers to arrays.
255+
252256
Removed checks
253257
^^^^^^^^^^^^^^
254258

0 commit comments

Comments
 (0)