[clang] Add 'forNone' AST matcher (PR #86230)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 21 19:15:55 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 718fbbef5f18a2b7e7fc4f842b1452ae9bee581a b0ef223dfab9c8ebc67601ccfbbe0ce3abe15f12 -- clang/include/clang/ASTMatchers/ASTMatchers.h clang/include/clang/ASTMatchers/ASTMatchersInternal.h clang/lib/ASTMatchers/ASTMatchersInternal.cpp clang/lib/ASTMatchers/Dynamic/Registry.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/include/clang/ASTMatchers/ASTMatchersInternal.h b/clang/include/clang/ASTMatchers/ASTMatchersInternal.h
index bf5aaf74c0..31c0ec2c29 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchersInternal.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchersInternal.h
@@ -1645,8 +1645,8 @@ public:
bool matches(const T &Node, ASTMatchFinder *Finder,
BoundNodesTreeBuilder *Builder) const override {
BoundNodesTreeBuilder MatchingBuilder(*Builder);
- bool AnyMatched = Finder->matchesChildOf(Node, this->InnerMatcher, &MatchingBuilder,
- ASTMatchFinder::BK_All);
+ bool AnyMatched = Finder->matchesChildOf(
+ Node, this->InnerMatcher, &MatchingBuilder, ASTMatchFinder::BK_All);
if (!AnyMatched) {
// We didn't iterate over any nodes that matched, so
// Builder would be empty. This is a success case.
``````````
</details>
https://github.com/llvm/llvm-project/pull/86230
More information about the cfe-commits
mailing list