summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/virtualdown.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/virtualdown.cxx')
-rw-r--r--compilerplugins/clang/virtualdown.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/compilerplugins/clang/virtualdown.cxx b/compilerplugins/clang/virtualdown.cxx
index 9e59c842f49f..48df7934bc04 100644
--- a/compilerplugins/clang/virtualdown.cxx
+++ b/compilerplugins/clang/virtualdown.cxx
@@ -204,7 +204,7 @@ std::string VirtualDown::niceName(const CXXMethodDecl* cxxMethodDecl)
std::string VirtualDown::toString(SourceLocation loc)
{
SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc(loc);
- StringRef name = compiler.getSourceManager().getFilename(expansionLoc);
+ StringRef name = getFileNameOfSpellingLoc(expansionLoc);
std::string sourceLocation
= std::string(name.substr(strlen(SRCDIR) + 1)) + ":"
+ std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc));