From: Alexander Kornienko Date: Fri, 8 Jul 2016 10:51:00 +0000 (+0000) Subject: [ASTMatchers] Add missing forEachArgumentWithParam() to code sample X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f85b114805dc5d68c076149e79d0f243c3dfdf32;p=clang [ASTMatchers] Add missing forEachArgumentWithParam() to code sample 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 --- diff --git a/include/clang/ASTMatchers/ASTMatchers.h b/include/clang/ASTMatchers/ASTMatchers.h index a546518993..28449eaacd 100644 --- a/include/clang/ASTMatchers/ASTMatchers.h +++ b/include/clang/ASTMatchers/ASTMatchers.h @@ -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