[clang-tools-extra] [clang-tidy] Fix formatting and add release notes entry (PR #141584)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 27 05:16:49 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-tidy
Author: None (FabianWolff)
<details>
<summary>Changes</summary>
Follow-up to #<!-- -->141092.
---
Full diff: https://github.com/llvm/llvm-project/pull/141584.diff
2 Files Affected:
- (modified) clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp (+2-2)
- (modified) clang-tools-extra/docs/ReleaseNotes.rst (+3)
``````````diff
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..bc9f4a4a11bcc 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -114,6 +114,9 @@ Improvements to clang-tidy
- Fixed bug in :program:`run_clang_tidy.py` where the program would not
correctly display the checks enabled by the top-level `.clang-tidy` file.
+- Fixed some false positives in the ``readability-redundant-smartptr-get``
+ check involving smart pointers to arrays.
+
New checks
^^^^^^^^^^
``````````
</details>
https://github.com/llvm/llvm-project/pull/141584
More information about the cfe-commits
mailing list