<div dir="ltr"><p dir="ltr">Oh, that was my problem, thank you so much! </p>
<p dir="ltr">Apparently, when following a tutorial, I glossed over the important distinction between what gets parsed when using HandleTopLevelDecl vs. HandleTranslationUnit. </p>
<p dir="ltr">Much thanks, <br>
Kevin </p>
<div class="gmail_quote"><br></div><div class="gmail_quote">On Jul 16, 2013 7:31 PM, "Eli Friedman" <<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>> wrote:<br type="attribution">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
n Tue, Jul 16, 2013 at 5:05 PM, Kevin Boos <<a href="mailto:kevinaboos@gmail.com" target="_blank">kevinaboos@gmail.com</a>> wrote:<br>
> Ah, I see now that there are multiple hasBody() functions. I just tried<br>
> using that hasBody(FunctionDecl *&), and it returns false. Makes sense<br>
> because it's essentially the same as me manually iterating over each redecl.<br>
><br>
> I am indeed using ASTConsumer alongside a RecursiveASTVisitor in the<br>
> libtooling environment. So you're saying that my code (some analysis inside<br>
> VisitFunctionDecl or VisitStmt, per se) will be unaware of the existence of<br>
> a future foo() definition until VisitFunctionDecl is called on that foo()<br>
> definition?<br>
><br>
> If so, then there is no way to inspect the body/definition of foo() until<br>
> VisitFunctionDecl visits it, right? Specifically, while visiting the main()<br>
> FunctionDecl*, I cannot access the Stmts inside the foo() definition? That's<br>
> really what I need.<br>
<br>
You can... you just have to call your visitor from the<br>
HandleTranslationUnit callback.<br>
<br>
-Eli<br>
</blockquote></div>
</div>