<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Dec 8, 2013 at 12:19 PM, Danya Berezun <span dir="ltr"><<a href="mailto:danya.berezun@gmail.com" target="_blank">danya.berezun@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi,
<div><br></div><div>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?</div>
</div></blockquote><div><br></div><div>One way is to use the AST matchers:</div><div><a href="http://clang.llvm.org/docs/LibASTMatchers.html">http://clang.llvm.org/docs/LibASTMatchers.html</a></div><div><br></div><div>Apart from that, you can always try to traverse the AST on your own...</div>
<div><a href="http://clang.llvm.org/docs/IntroductionToTheClangAST.html">http://clang.llvm.org/docs/IntroductionToTheClangAST.html</a></div><div><br></div><div>Cheers,</div><div>/Manuel</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">Thanks,</span><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">Daniil.</span></div>
</div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>