<div dir="ltr">I'm afraid that you can't because AST is supposed to be immutable once built. You might be able to achieve this through source to source translation...</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Jul 11, 2014 at 11:46 AM, Manasij Mukherjee <span dir="ltr"><<a href="mailto:manasij7479@gmail.com" target="_blank">manasij7479@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div><div><div><div><div>Hi,<br></div>I have a Decl* which can be cast into the appropriate Decl types.<br></div>I want to remove some specific information about that Decl from the AST.<br><br>
</div>For example, if it isa ClassTemplateDecl, I need to remove its default template arguments if it has them.<br><br></div>Or if I have an EnumDecl that has a specific type specified, like:<br></div>(enum a :int {a,b,c};)<br>
</div>That information needs to be erased.<br><br></div>How can I perform these kinds of changes to a Decl?<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>
<br>Manasij Mukherjee<br></div></font></span></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>