-
Notifications
You must be signed in to change notification settings - Fork 14k
[clang-tidy] Fix formatting and add release notes entry #141584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-clang-tools-extra Author: None (FabianWolff) ChangesFollow-up to #141092. Full diff: https://github.com/llvm/llvm-project/pull/141584.diff 2 Files Affected:
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
^^^^^^^^^^
|
@llvm/pr-subscribers-clang-tidy Author: None (FabianWolff) ChangesFollow-up to #141092. Full diff: https://github.com/llvm/llvm-project/pull/141584.diff 2 Files Affected:
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
^^^^^^^^^^
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Follow-up to #141092.