https://github.com/FabianWolff created https://github.com/llvm/llvm-project/pull/141584
Follow-up to #141092. >From eccc89a78d2da840279d584d0b6580269b7fb3fc Mon Sep 17 00:00:00 2001 From: Fabian Wolff <fwo...@google.com> Date: Tue, 27 May 2025 12:13:32 +0000 Subject: [PATCH 1/2] Run `clang-format` --- .../clang-tidy/readability/RedundantSmartptrGetCheck.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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( >From f81178ec1022213fdcab91baf348e689b2b4647d Mon Sep 17 00:00:00 2001 From: Fabian Wolff <fwo...@google.com> Date: Tue, 27 May 2025 12:13:32 +0000 Subject: [PATCH 2/2] Document change in the release notes --- clang-tools-extra/docs/ReleaseNotes.rst | 3 +++ 1 file changed, 3 insertions(+) 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 ^^^^^^^^^^ _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits