[cfe-dev] Question about ASTMatchers
Manuel Klimek
klimek at google.com
Thu Feb 20 07:52:07 PST 2014
On Thu, Feb 20, 2014 at 4:43 PM, Richard <legalize at xmission.com> wrote:
>
> In article <
> CAOsfVvnnO-6VRGLdzWuvp-Qb1qR61wAqJ_d8vHX-LgyWTa6u+g at mail.gmail.com>,
> Manuel Klimek <klimek at google.com> writes:
>
> > [...] Assuming you want to "get" it, you'd
> > say something like varDecl(hasType(qualType().bind("t"))) (untested ;),
> and
> > then in the callback extract the QualType and call getAsString() on it.
>
> Thanks for these responses, Manuel! I'm still learning these matchers
> and there's quite a bit to digest there. These suggestions have been
> very instructive!
>
You might want to take a look at clang-query, which helps with
experimenting with matchers quickly (no compile needed, it uses the dynamic
matchers).
> --
> "The Direct3D Graphics Pipeline" free book <
> http://tinyurl.com/d3d-pipeline>
> The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
> The Terminals Wiki <http://terminals.classiccmp.org>
> Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140220/eaee59f5/attachment.html>
More information about the cfe-dev
mailing list