Do you happen to know anything about the TraverseStmt() method from my previous post any chance? Thats stopping me from digging in more.<br><br>(I see the equivalent TraverseStmt() method now, but I do not see a way to get statements fron the ASTContext.)<br>
<br>Thanks<br><br><div class="gmail_quote">On Thu, Jun 9, 2011 at 12:57 PM, Joshua Cranmer <span dir="ltr"><<a href="mailto:Pidgeot18@gmail.com">Pidgeot18@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 class="im">On 6/9/2011 6:37 AM, ret val wrote:<br>
> Also, from CallExpr *node, is it possible to print the names of the<br>
> function being called and what called it? Since there seems to be no<br>
> real Symbol Table I'm not sure if this information is gone at this<br>
> point or not.<br>
><br>
> Thanks again everyone<br>
<br>
</div> From CallExpr, you can use getDirectCallee() to get a FunctionDecl* of<br>
the function being called (assuming it's not a function pointer call);<br>
since FunctionDecl is a subclass of NamedDecl, you can use that decl to<br>
get the name of the function.<br>
<br>
As for getting the function it's in, I'm sure there's a way to do it, I<br>
just don't know it off the top of my head.<br>
<br>
--<br>
<div class="im">Joshua Cranmer<br>
News submodule owner<br>
</div>DXR coauthor<br>
<div><div></div><div class="h5"><br>
<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>
</div></div></blockquote></div><br>