[cfe-commits] [PATCH] AST matchers

Matthieu Monrocq matthieu.monrocq at gmail.com
Fri Jun 15 10:29:29 PDT 2012


On Fri, Jun 15, 2012 at 2:49 PM, Manuel Klimek <klimek at google.com> wrote:

> ... one of the final pieces that we have in the tooling branch are the AST
> matchers.
>
> The main user interface is in ASTMatchers.h and ASTMatchFinder.h.
>
> Note that the AST matchers are completely independent of the tooling
> framework, but they are easy to plug into the tooling framework (see
> ASTMatchersTest.cpp).
>
> (There's also a dynamic way to contruct matchers in the works by Samuel
> Benzaquen, but it's not included in this patch, as it is a pure addition to
> the  proposed matcher library)
>
> We've been using the library to drive large scale changes, metrics and
> analysis internally for > 1 year now.
>
> One of the more nit-picky review questions that I don't know what to do
> about is style:
> Matchers are an in-language DSL. We use meta-programming techniques to be
> able to contruct readable expressions without the need to spell out the
> types all the time. This leads to the matcher constructions being boths
> free-standing functions and call-able classes.
> Internally, we've used CamelCase with an upper case first letter for the
> matchers, but I'm fine with changing it either way.
>
> Thanks!
> /Manuel
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
> Ah, finally!

After having seen Chandler's talk on using automatic refactoring (at
scale), I have been waiting for those to be available for everyone, thanks!

-- Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120615/ad7e9cda/attachment.html>


More information about the cfe-commits mailing list