[cfe-dev] Get filename from ASTVisitor

Gábor Kozár kozargabor at gmail.com
Sun Apr 21 15:35:22 PDT 2013

Yes, that's because you need to use an object instance of the SourceManager
class. You should have an instance available, if you were able to create a

Also, before asking questions in the mail-list, please try reading the
documentation and doing some Google searches. It's unlikely that you'll get
a reply to such RTFM question in the future. (Not to mention that the C++
compiler actually stated the problem accurately, so you could have figured
this out by yourself if you had tried.)

2013/4/21 suppamax <max.giacometti at gmail.com>

> Thank you for your reply.
> Adding
> llvm::errs() << "Filename " <<
> SourceManager::getBufferName(v->getLocation()) << "\n";
> leads to
> error: call to non-static member function without an object argument
> --
> View this message in context:
> http://clang-developers.42468.n3.nabble.com/Get-filename-from-ASTVisitor-tp4031615p4031619.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130422/ef1cbc66/attachment.html>

More information about the cfe-dev mailing list