Hi all,<br><br>I tried to twist a bit the AST by turning a very simple statement into a function  and invoking in a statement as follows<br><br>void caller() { global_var++; }<br><br>===> <br><br>void _implicit_body() {  global_var++; }  // _implicit_body added into the translation unit via addDecl<br>
<br>void _implicit_invoker(void *f) {<br>    void (*fptr)()  = (void(*)()) f;<br>    fptr();<br>}   <br><br>void caller() {<br>   _implicit_invoker((void*)implicit_body); // CallExpr<br>}<br><br>The generated AST looks fine. However the generated code is broken since there is *no* code generated for function _implict_body.  I am wondering if there is a way to mark a function such that codegen always generates code for this function. <br>
<br>Thanks,<br><br>Wei<br>