[PATCH] ASTMatcher for Attr
Manuel Klimek
klimek at google.com
Thu Aug 21 16:31:18 PDT 2014
On Thu Aug 21 2014 at 4:27:37 PM Aaron Ballman <aaron at aaronballman.com>
wrote:
> On Thu, Aug 21, 2014 at 7:10 PM, Jacques Pienaar <jpienaar at google.com>
> wrote:
> > It is to make the interface a bit easier. The dynamic matcher is at
> runtime
> > where we don't have access to the constants. So the string conversion
> allows
> > referring to attributes via a name instead of raw the enum value.
>
> Ahh, okay, so this is basically a hard requirement. Ew (in the case of
> attributes). Those enum names are subject to change on a whim. When
> the enum changes, it's trivial to find breakages because the compiler
> will tell you immediately. With the dynamic matchers, that won't be
> the case. Hopefully that's a non-issue. :-)
>
Dynamic matchers are there for people to use interactive tools. The enum
can change the same way the AST matchers can change without warning.
> Can we implement getAttrKind as a private API within ArgTypeTraits
> instead of making it a public API in Basic?
>
No idea, which is why I was pulling in Richard :) Sounds like a good idea,
though...
>
> ~Aaron
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140821/0158600d/attachment.html>
More information about the cfe-commits
mailing list