[PATCH] D17986: [ASTMatchers] New matcher hasReturnValue added
Samuel Benzaquen via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 18 12:40:03 PDT 2016
sbenza added inline comments.
================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:4848
@@ +4847,3 @@
+/// \code
+/// return a+b;
+/// \endcode
----------------
`a + b` (with spaces)
A few in this comment, and one in the test.
================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:4854
@@ +4853,3 @@
+/// matching 'a+b'
+AST_MATCHER_P(ReturnStmt, hasReturnValue, internal::Matcher<Expr>, InnerMatcher) {
+ BoundNodesTreeBuilder Result(*Builder);
----------------
Wouldn't this just be:
AST_MATCHER_P(...) {
return InnerMatcher.matches(*Node.getRetValue(), Finder, Builder);
}
http://reviews.llvm.org/D17986
More information about the cfe-commits
mailing list