Re-design the convenience interfaces on MatchFinder.
authorManuel Klimek <klimek@google.com>
Fri, 1 Feb 2013 13:41:35 +0000 (13:41 +0000)
committerManuel Klimek <klimek@google.com>
Fri, 1 Feb 2013 13:41:35 +0000 (13:41 +0000)
commit191c093af13a7defa77c70e868b53102d679bb2b
tree0fb895d5f6372699db0dadad032ba21f01acf437
parent540bacb1b96d1d9ec323127132c0d14d2b031a3e
Re-design the convenience interfaces on MatchFinder.

First, this implements a match() method on MatchFinder; this allows us
to get rid of the findAll implementation, as findAll is really a special
case of recursive matchers on match.

Instead of findAll, provide a convenience function match() that lets
users iterate easily over the results instead of needing to implement
callbacks.

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