diff options
Diffstat (limited to 'lib/Lex/PTHLexer.cpp')
-rw-r--r-- | lib/Lex/PTHLexer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index b2870f46fd..fd7c367c70 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/lib/Lex/PTHLexer.cpp @@ -311,8 +311,9 @@ unsigned PTHManager::getSpelling(FileID FID, unsigned FPos, } unsigned PTHManager::getSpelling(SourceLocation Loc, const char *&Buffer) { - std::pair<FileID, unsigned> LocInfo = - PP->getSourceManager().getDecomposedFileLoc(Loc); + SourceManager &SM = PP->getSourceManager(); + Loc = SM.getSpellingLoc(Loc); + std::pair<FileID, unsigned> LocInfo = SM.getDecomposedFileLoc(Loc); return getSpelling(LocInfo.first, LocInfo.second, Buffer); } |