]> granicus.if.org Git - clang/commitdiff
[ASTMatchers] Add missing forEachArgumentWithParam() to code sample
authorAlexander Kornienko <alexfh@google.com>
Fri, 8 Jul 2016 10:51:00 +0000 (10:51 +0000)
committerAlexander Kornienko <alexfh@google.com>
Fri, 8 Jul 2016 10:51:00 +0000 (10:51 +0000)
Reviewers: klimek

Subscribers: cfe-commits, klimek

Patch by Martin Boehme!

Differential Revision: http://reviews.llvm.org/D21799

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274835 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/ASTMatchers/ASTMatchers.h

index a5465189930c80e0f7b8340f19b8a014486f5d7f..28449eaacd6bb35497bc2c1de15cef749bf982c0 100644 (file)
@@ -3186,8 +3186,11 @@ AST_MATCHER_P2(FunctionDecl, hasParameter,
 ///   int y;
 ///   f(y);
 /// \endcode
-/// callExpr(declRefExpr(to(varDecl(hasName("y")))),
-/// parmVarDecl(hasType(isInteger())))
+/// callExpr(
+///   forEachArgumentWithParam(
+///     declRefExpr(to(varDecl(hasName("y")))),
+///     parmVarDecl(hasType(isInteger()))
+/// ))
 ///   matches f(y);
 /// with declRefExpr(...)
 ///   matching int y