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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c
index 3126b319ef..1ef8e924bc 100644
--- a/tools/c-index-test/c-index-test.c
+++ b/tools/c-index-test/c-index-test.c
@@ -3,9 +3,13 @@
#include <stdio.h>
static void PrintDecls(CXTranslationUnit Unit, CXCursor Cursor) {
- if (clang_isDeclaration(Cursor.kind))
- printf("%s => %s\n", clang_getKindSpelling(Cursor.kind),
- clang_getDeclSpelling(Cursor.decl));
+ if (clang_isDeclaration(Cursor.kind)) {
+ printf("%s => %s", clang_getKindSpelling(Cursor.kind),
+ clang_getDeclSpelling(Cursor.decl));
+ printf(" (%s,%d:%d)\n", clang_getCursorSource(Cursor),
+ clang_getCursorLine(Cursor),
+ clang_getCursorColumn(Cursor));
+ }
}
/*