[clang] 39ff002 - [ASTMatchers] Clarify example in docs
Stephen Kelly via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 14 05:49:32 PST 2021
Author: Stephen Kelly
Date: 2021-02-14T13:49:06Z
New Revision: 39ff002e526e1df3e4bebbfdd2beebf0440d7d92
URL: https://github.com/llvm/llvm-project/commit/39ff002e526e1df3e4bebbfdd2beebf0440d7d92
DIFF: https://github.com/llvm/llvm-project/commit/39ff002e526e1df3e4bebbfdd2beebf0440d7d92.diff
LOG: [ASTMatchers] Clarify example in docs
Added:
Modified:
clang/docs/LibASTMatchersReference.html
Removed:
################################################################################
diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html
index ac816d28970b..a956091318a1 100644
--- a/clang/docs/LibASTMatchersReference.html
+++ b/clang/docs/LibASTMatchersReference.html
@@ -508,7 +508,7 @@ <h2 id="traverse-mode">Traverse Mode</h2>
<pre>
binaryOperator(
hasOperatorName("<"),
- hasRHS(integerLiteral(equals(0)))
+ hasRHS(hasDescendant(integerLiteral(equals(0))))
)
</pre>
given:
@@ -529,6 +529,12 @@ <h2 id="traverse-mode">Traverse Mode</h2>
</td>
<td>
1 match found.
+
+<pre>
+ return a < b;
+ ^~~~~
+</pre>
+
</td>
<td>
No match found.
More information about the cfe-commits
mailing list