Adds a convenience function selectFirst to simplify matching.
authorManuel Klimek <klimek@google.com>
Wed, 6 Feb 2013 10:33:21 +0000 (10:33 +0000)
committerManuel Klimek <klimek@google.com>
Wed, 6 Feb 2013 10:33:21 +0000 (10:33 +0000)
commit2cff49e026879ad2f0c24de4a2c3168fb83c663e
treea82c5849fdb59188eb07e9610127056ede4b015e
parentc697ad29ff7ffd13826bffa620650b725795034e
Adds a convenience function selectFirst to simplify matching.

A very common use case is to search for the first occurrence of
a certain node that is a descendant of another node. In that
case, selectFirst significantly simplifies the code at the client side.

llvm-svn: 174499
clang/include/clang/ASTMatchers/ASTMatchFinder.h
clang/unittests/ASTMatchers/ASTMatchersTest.cpp