Dear Sir/Madam,<div><br></div><div>I am implementing a code that typechecks C source code.</div><div>At some point in my program I used the following function in order to visit all functions and their bodies.</div><div><br>
</div><div><div>      // Function (declaration and body) visitor.</div><div>      void VisitFunctionDecl(FunctionDecl *D) {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>  BaseDeclVisitor::VisitFunctionDecl(D);</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>  if (D->isThisDeclarationADefinition()) {</div><div>            BaseStmtVisitor::Visit(D->getBody());</div><div>            </div><div><span class="Apple-tab-span" style="white-space:pre">  </span>  }</div>
<div>      }</div></div><div><br></div><div>The problem that I have is that if I test a C source file that has function calls to another file which contains the declaration and body of the functions, then it does not give me back the body of these functions.</div>
<div>As a result it tests only functions that their body is specified in the same source file that I am testing.</div><div>Any suggestions on how can I retrieve the functions bodies of these functions that are specified in other files ?</div>
<div><br></div><div>Sincerely yours,</div><div><br></div><div>Socrates</div>