diff options
Diffstat (limited to 'clang/lib/Basic')
| -rw-r--r-- | clang/lib/Basic/SourceManager.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index bf2c8be4679..66ae4861a6a 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/lib/Basic/SourceManager.cpp @@ -834,10 +834,11 @@ SourceManager::getDecomposedSpellingLocSlowCase(const SrcMgr::SLocEntry *E,    SourceLocation Loc;    do {      Loc = E->getExpansion().getSpellingLoc(); +    Loc = Loc.getFileLocWithOffset(Offset);      FID = getFileID(Loc);      E = &getSLocEntry(FID); -    Offset += Loc.getOffset()-E->getOffset(); +    Offset = Loc.getOffset()-E->getOffset();    } while (!Loc.isFileID());    return std::make_pair(FID, Offset);  | 

