[cfe-dev] determining Decl's source
retval386 at gmail.com
Tue Jul 19 16:44:59 PDT 2011
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.
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?
Some one in IRC mentioned using SourceManager to check the file it is in it
looks like I would have todo something like
dyn_cast to a FullSourceLoc and use FullSourceLoc::getFileID()
But I'm having problems with the dyn_cast, my nonfunctional one looks like
this and I'm not sure how to correct it.
FullSourceLoc &loc = dyn_cast<FullSourceLoc>(D->getLocation());
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev