summaryrefslogtreecommitdiffstats
path: root/clang/docs/LibASTMatchersReference.html
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2016-03-22 11:03:03 +0000
committerAlexander Kornienko <alexfh@google.com>2016-03-22 11:03:03 +0000
commit976921d4b4911394fe0e88b047a01dad5e85c701 (patch)
tree4f6f70f1ef97ebc95a5d338b92331bc6c75d65bd /clang/docs/LibASTMatchersReference.html
parente5c095923dddb949f15f13645d69dc3c3d2342e7 (diff)
downloadbcm5719-llvm-976921d4b4911394fe0e88b047a01dad5e85c701.tar.gz
bcm5719-llvm-976921d4b4911394fe0e88b047a01dad5e85c701.zip
[ASTMatchers] New matcher hasReturnValue added
Summary: A checker (will be uploaded after this patch) needs to check implicit casts. Existing generic matcher "has" ignores implicit casts and parenthesized expressions and no specific matcher for matching return value expression preexisted. The patch adds such a matcher (hasReturnValue). Reviewers: klimek, sbenza Subscribers: xazax.hun, klimek, cfe-commits Patch by Ádám Balogh! Differential Revision: http://reviews.llvm.org/D17986 llvm-svn: 264037
Diffstat (limited to 'clang/docs/LibASTMatchersReference.html')
-rw-r--r--clang/docs/LibASTMatchersReference.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html
index ba3fa51b87b..58ab6d12850 100644
--- a/clang/docs/LibASTMatchersReference.html
+++ b/clang/docs/LibASTMatchersReference.html
@@ -4854,6 +4854,18 @@ Usable as: Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1Block
</pre></td></tr>
+<tr><td>Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1ReturnStmt.html">ReturnStmt</a>&gt;</td><td class="name" onclick="toggle('hasReturnValue0')"><a name="hasReturnValue0Anchor">hasReturnValue</a></td><td>Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1Expr.html">Expr</a>&gt; InnerMatcher</td></tr>
+<tr><td colspan="4" class="doc" id="hasReturnValue0"><pre>Matches the return value expression of a return statement
+
+Given
+ return a + b;
+hasReturnValue(binaryOperator())
+ matches 'return a + b'
+with binaryOperator()
+ matching 'a + b'
+</pre></td></tr>
+
+
<tr><td>Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1StmtExpr.html">StmtExpr</a>&gt;</td><td class="name" onclick="toggle('hasAnySubstatement1')"><a name="hasAnySubstatement1Anchor">hasAnySubstatement</a></td><td>Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>&gt; InnerMatcher</td></tr>
<tr><td colspan="4" class="doc" id="hasAnySubstatement1"><pre>Matches compound statements where at least one substatement matches
a given matcher. Also matches StmtExprs that have CompoundStmt as children.
OpenPOWER on IntegriCloud