[cfe-dev] Question about rewriter.

Manuel Klimek klimek at google.com
Wed Dec 11 12:40:25 PST 2013

On Sun, Dec 8, 2013 at 12:19 PM, Danya Berezun <danya.berezun at gmail.com>wrote:

> Hi,
> I'm trying to rewrite all DeclStmt-s in which type of variable in VarDecl
> is a pointer type and rewrite all operator new calls. I know that I can
> iterate all VarDecl-s by traversing AST and replace such statements, but
> how to get theirs types and names?

One way is to use the AST matchers:

Apart from that, you can always try to traverse the AST on your own...


> Thanks,
> Daniil.
> _______________________________________________
> 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/20131211/52b67d77/attachment.html>

More information about the cfe-dev mailing list