summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/libclang/CIndex.cpp')
-rw-r--r--clang/tools/libclang/CIndex.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 7838384f3bc..18842dc8278 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -2824,7 +2824,7 @@ void clang_getInstantiationLocation(CXSourceLocation location,
const SourceManager &SM =
*static_cast<const SourceManager*>(location.ptr_data[0]);
- SourceLocation InstLoc = SM.getInstantiationLoc(Loc);
+ SourceLocation InstLoc = SM.getExpansionLoc(Loc);
// Check that the FileID is invalid on the expansion location.
// This can manifest in invalid code.
@@ -2865,7 +2865,7 @@ void clang_getSpellingLocation(CXSourceLocation location,
SM.getFileEntryForID(SM.getDecomposedLoc(SimpleSpellingLoc).first))
SpellLoc = SimpleSpellingLoc;
else
- SpellLoc = SM.getInstantiationLoc(SpellLoc);
+ SpellLoc = SM.getExpansionLoc(SpellLoc);
}
std::pair<FileID, unsigned> LocInfo = SM.getDecomposedLoc(SpellLoc);
OpenPOWER on IntegriCloud