aboutsummaryrefslogtreecommitdiff
path: root/tools/c-index-test/c-index-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/c-index-test/c-index-test.c')
-rw-r--r--tools/c-index-test/c-index-test.c3
1 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 305fb40f9b..acc868e52b 100644
--- a/tools/c-index-test/c-index-test.c
+++ b/tools/c-index-test/c-index-test.c
@@ -182,10 +182,11 @@ static void PrintCursor(CXCursor Cursor) {
printf("[");
for (I = 0; I != N; ++I) {
CXCursor Ovl = clang_getOverloadedDecl(Referenced, I);
+ CXSourceLocation Loc;
if (I)
printf(", ");
- CXSourceLocation Loc = clang_getCursorLocation(Ovl);
+ Loc = clang_getCursorLocation(Ovl);
clang_getInstantiationLocation(Loc, 0, &line, &column, 0);
printf("%d:%d", line, column);
}