[ASTMatchers] Clarify example in docs

This commit is contained in:
Stephen Kelly 2021-02-14 13:45:56 +00:00
parent b40fde062c
commit 39ff002e52

View File

@ -508,7 +508,7 @@ void func() {
<pre>
binaryOperator(
hasOperatorName("&lt;"),
hasRHS(integerLiteral(equals(0)))
hasRHS(hasDescendant(integerLiteral(equals(0))))
)
</pre>
given:
@ -529,6 +529,12 @@ bool isLess(const HasSpaceship& a, const HasSpaceship& b) {
</td>
<td>
1 match found.
<pre>
return a < b;
^~~~~
</pre>
</td>
<td>
No match found.