<div class="gmail_quote">On Fri, Jul 6, 2012 at 12:25 PM, Satya Prakash Prasad <span dir="ltr"><<a href="mailto:satyaprakash.prasad@gmail.com" target="_blank">satyaprakash.prasad@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I made some progress with whatever support I received from this<br>
discussion forum. Thanks to all who responded to my request. My<br>
requirement now is to find a way I can print CLANG AST code to C++ / C<br>
human readable statements:<br>
<div class="im"><br>
    bool VisitStmt(Stmt *s) {<br>
        if (isa<CompoundStmt>(s)) {<br>
                CompoundStmt *S = cast<CompoundStmt>(s);<br>
                for (CompoundStmt::body_iterator  I = S->body_begin(),<br>
E = S->body_end(); I != E; ++I)<br>
                {<br>
                        Stmt *i =  cast<Stmt>(*I);<br>
</div>                        //How can I print the C++ / C statement which<br>
CLANG is processing<br></blockquote><div><br></div><div>You can use i->dumpAll() if you want to see what's going on.</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>
        }<br>
<br>
        return true;<br>
    }<br>
<br>
Regards,<br>
Prakash<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br>