diff options
Diffstat (limited to 'clang/tools/libclang/CXSourceLocation.cpp')
-rw-r--r-- | clang/tools/libclang/CXSourceLocation.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/clang/tools/libclang/CXSourceLocation.cpp b/clang/tools/libclang/CXSourceLocation.cpp index c715eecdecf..5d49f42a4a5 100644 --- a/clang/tools/libclang/CXSourceLocation.cpp +++ b/clang/tools/libclang/CXSourceLocation.cpp @@ -294,14 +294,7 @@ void clang_getSpellingLocation(CXSourceLocation location, const SourceManager &SM = *static_cast<const SourceManager*>(location.ptr_data[0]); - SourceLocation SpellLoc = Loc; - - // Unravel the macro instantiation stack. This logic mirrors that - // in DiagnosticRenderer. - while (SpellLoc.isMacroID()) { - SpellLoc = SM.getImmediateMacroCallerLoc(SpellLoc); - } - + SourceLocation SpellLoc = SM.getFileLoc(Loc); std::pair<FileID, unsigned> LocInfo = SM.getDecomposedLoc(SpellLoc); FileID FID = LocInfo.first; unsigned FileOffset = LocInfo.second; |