aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/c-index-test/c-index-test.c2
-rw-r--r--tools/libclang/CXSourceLocation.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c
index b46e3842a0..3bfdeeed2a 100644
--- a/tools/c-index-test/c-index-test.c
+++ b/tools/c-index-test/c-index-test.c
@@ -340,7 +340,7 @@ static const char* GetCursorSource(CXCursor Cursor) {
CXSourceLocation Loc = clang_getCursorLocation(Cursor);
CXString source;
CXFile file;
- clang_getSpellingLocation(Loc, &file, 0, 0, 0);
+ clang_getExpansionLocation(Loc, &file, 0, 0, 0);
source = clang_getFileName(file);
if (!clang_getCString(source)) {
clang_disposeString(source);
diff --git a/tools/libclang/CXSourceLocation.cpp b/tools/libclang/CXSourceLocation.cpp
index 71383445c5..d8d4c96e48 100644
--- a/tools/libclang/CXSourceLocation.cpp
+++ b/tools/libclang/CXSourceLocation.cpp
@@ -212,6 +212,7 @@ void clang_getExpansionLocation(CXSourceLocation location,
*column = SM.getExpansionColumnNumber(ExpansionLoc);
if (offset)
*offset = SM.getDecomposedLoc(ExpansionLoc).second;
+ return;
}
// FIXME: