I am using RecursiveASTVistor and implementing the VisitDecl() method. While trying to collect all the Decs for function calls and function pointers, I also collect those from standard libraries. I would like to skip these and only look at Decs from the input files.<br>
<br>I am wondering what a good way to go about this is. Decl::hasBody() looks interested, but wouldnt account for inline functions. Could this be fixed?<br><br>Some one in IRC mentioned using SourceManager to check the file it is in it looks like I would have todo something like<br>
Decl::getLocation()<br>dyn_cast to a FullSourceLoc and use FullSourceLoc::getFileID()<br>SourceManager::getFileEntryForID()<br>FileEntry::getName()<br><br>But I'm having problems with the dyn_cast, my nonfunctional one looks like this and I'm not sure how to correct it.<br>
FullSourceLoc &loc = dyn_cast<FullSourceLoc>(D->getLocation());<br><br>Thanks<br>