[cfe-dev] Get filename from ASTVisitor
kozargabor at gmail.com
Sun Apr 21 10:03:21 PDT 2013
You can get the SourceLocation of the Decl using getLocStart(), getLocEnd()
or getLocation(). Then you can use SourceManager :: getBufferName() to get
the name of the file containing the SourceLocation.
Hope this helps.
2013/4/21 suppamax <max.giacometti at gmail.com>
> I am using a RecursiveASTVisitor to get the declaration statements of my
> I took inspiration from the example shown here:
> I extended the example so to include "included" files in the AST (this is
> necessary to be able to identify variable declarations that use non-basic
> data types).
> Now I want to filter all variable declarations that are not part of the
> that I want to analyze.
> How can I do this?
> Thanks a lot,
> View this message in context:
> Sent from the Clang Developers mailing list archive at Nabble.com.
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev