[cfe-commits] [PATCH] Adds a .bind("id") method to bind AST matchers to replace the id("id", ...) matcher

Daniel Jasper djasper at google.com
Mon Jul 23 04:24:09 PDT 2012


-/// To and T are in the same type hierarchy, and thus dyn_cast can be
-/// called to convert a To to a T.
+///   ArgumentAdaptingMatcher<HasMatcher, T>(InnerMatcher);

I'd keep the "To and T ..." sentence, as it helps understanding.

Also please include an explanation of the CXXMemberCall change in the
commit message, as it is a somewhat unrelated change.

The rest looks good to me.

Cheers,
Daniel


On Thu, Jul 19, 2012 at 7:26 PM, Manuel Klimek <klimek at google.com> wrote:

> This patch implements one of Chandler's wishes:
>
> You can now say:
> record(hasName("::X")).bind("x")
> instead of
> id("x", record(hasName("::X"))
>
> We also now allow binding only on the dynamic cast matchers (which are
> the ones named with nouns in the language),
> as those don't introduce ambiguities on which part is bound (the node
> the matcher is a predicate on, or the node
> the matcher's submatchers will be matched on).
>
> Also fixes some minor issues that were in the way of the bind change.
>
> We don't change all users of id() yet - I first want to merge the
> tooling branch and make sure we don't run into anything
> unexpected.
>
> Cheers,
> /Manuel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120723/81564a6f/attachment.html>


More information about the cfe-commits mailing list