<div dir="ltr">On Sat, Sep 7, 2013 at 2:57 PM, maxs <span dir="ltr"><<a href="mailto:xtxwy.ustc@gmail.com" target="_blank">xtxwy.ustc@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, everyone :<br>
     I want to add a function or a statement to an AST? Is there simple way to do this? Using Sema or call the FunctionDecl's create method? Thanks.<br></blockquote><div><br></div><div>Generally speaking, the easy way is to add it in the code and let clang parse the code (seriously, that's what works best, and has a couple of other upsides - you can also do that programatically).</div>
<div><br></div><div>Or to turn it around, the other question would be: why do you want to add a function to the AST instead of adding it to the code? :)</div><div><br></div><div>Cheers,</div><div>/Manuel</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
xtxwy<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">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/<u></u>mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div></div>