<div dir="ltr"><div>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 RecursiveASTVisitor.<br><br></div>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.)<br>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/21 suppamax <span dir="ltr"><<a href="mailto:max.giacometti@gmail.com" target="_blank">max.giacometti@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Thank you for your reply.<br>
<br>
Adding<br>
llvm::errs() << "Filename " <<<br>
SourceManager::getBufferName(v->getLocation()) << "\n";<br>
<br>
leads to<br>
error: call to non-static member function without an object argument<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/Get-filename-from-ASTVisitor-tp4031615p4031619.html" target="_blank">http://clang-developers.42468.n3.nabble.com/Get-filename-from-ASTVisitor-tp4031615p4031619.html</a><br>


<div class="HOEnZb"><div class="h5">Sent from the Clang Developers mailing list archive at Nabble.com.<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div>