[ASTMatcher] Extend hasAnyArgument to ObjCMessageExpr
authorGeorge Karpenkov <ekarpenkov@apple.com>
Wed, 7 Mar 2018 02:32:44 +0000 (02:32 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Wed, 7 Mar 2018 02:32:44 +0000 (02:32 +0000)
commita763fdfadd3fb80548e5c6c427e93fd64e1dabd4
tree081d2ee7c75dee83e43905abf6f19ac9ce3dc859
parentcddd6339e9006260204618ca07e299b90291e3e2
[ASTMatcher] Extend hasAnyArgument to ObjCMessageExpr

Currently hasArgument works with both ObjC messages and function calls,
but not hasAnyArgument.
This patch fixes that discrepancy, as it's often more convenient to use
hasAnyArgument.

On a more general note, it would be great to have a common superclass
for objc-call and function call, and a matcher matching that, but that's
probably a job for another commit.

Differential Revision: https://reviews.llvm.org/D44169

llvm-svn: 326865
clang/docs/LibASTMatchersReference.html
clang/include/clang/ASTMatchers/ASTMatchers.h
clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp