[PATCH] Re-design the convenience interfaces on MatchFinder.

Manuel Klimek klimek at google.com
Thu Jan 31 07:36:49 PST 2013


Hi djasper,

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 forEachDescendant() on match.

Next, provides some convenience functions that make matching a lot nicer
when one already has an ASTContext:
- a match function that returns a vector of BoundNodes to iterate over
- findAll functions that return a vector of T* for a given
  BindableMatcher<T>, which is the common use case for the more generic
  findAll on MatchFinder that's deleted in this change.

http://llvm-reviews.chandlerc.com/D359

Files:
  include/clang/ASTMatchers/ASTMatchFinder.h
  lib/ASTMatchers/ASTMatchFinder.cpp
  unittests/ASTMatchers/ASTMatchersTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D359.1.patch
Type: text/x-patch
Size: 11023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130131/ffd16a46/attachment.bin>


More information about the cfe-commits mailing list