[clang-tools-extra] 317f3bd - [clang-tidy] Fix formatting and add release notes entry (#141584)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 27 12:53:01 PDT 2025


Author: FabianWolff
Date: 2025-05-27T21:52:59+02:00
New Revision: 317f3bdcc1f96586489a9e48b494e593592b68cf

URL: https://github.com/llvm/llvm-project/commit/317f3bdcc1f96586489a9e48b494e593592b68cf
DIFF: https://github.com/llvm/llvm-project/commit/317f3bdcc1f96586489a9e48b494e593592b68cf.diff

LOG: [clang-tidy] Fix formatting and add release notes entry (#141584)

Follow-up to #141092.

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
    clang-tools-extra/docs/ReleaseNotes.rst

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp b/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
index baa977750d101..9774d93ff36fd 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
@@ -66,8 +66,8 @@ void registerMatchersForGetArrowStart(MatchFinder *Finder,
 
   // Make sure we are not missing the known standard types.
   const auto SmartptrAny = anyOf(knownSmartptr(), QuacksLikeASmartptr);
-  const auto SmartptrWithDeref =
-      anyOf(cxxRecordDecl(knownSmartptr(), HasRelevantOps), QuacksLikeASmartptr);
+  const auto SmartptrWithDeref = anyOf(
+      cxxRecordDecl(knownSmartptr(), HasRelevantOps), QuacksLikeASmartptr);
 
   // Catch 'ptr.get()->Foo()'
   Finder->addMatcher(

diff  --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index d6f2d2b37624e..e0f81a032c38d 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -249,6 +249,10 @@ Changes in existing checks
   <clang-tidy/checks/readability/qualified-auto>` check by adding the option
   `AllowedTypes`, that excludes specified types from adding qualifiers.
 
+- Improved :doc:`readability-redundant-smartptr-get
+  <clang-tidy/checks/readability/redundant-smartptr-get>` check by fixing
+  some false positives involving smart pointers to arrays.
+
 Removed checks
 ^^^^^^^^^^^^^^
 


        


More information about the cfe-commits mailing list