summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test/c-index-test.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-01-26 18:31:56 +0000
committerDouglas Gregor <dgregor@apple.com>2010-01-26 18:31:56 +0000
commit6165611986de4036a393bdafa743fa35d03fccfc (patch)
tree8c060a0b85b6fd7741c555013e5f0432c76e89c3 /clang/tools/c-index-test/c-index-test.c
parent1c7e3837fb3749b334ab718566f7c95a68d46b74 (diff)
downloadbcm5719-llvm-6165611986de4036a393bdafa743fa35d03fccfc.tar.gz
bcm5719-llvm-6165611986de4036a393bdafa743fa35d03fccfc.zip
Implement clang_annotateTokens(), which associates cursors with each
of the tokens within a raw token stream. This does not even attempt to handle macros yet. llvm-svn: 94561
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r--clang/tools/c-index-test/c-index-test.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index 1015aa5e744..243b8736f4f 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/tools/c-index-test/c-index-test.c
@@ -810,8 +810,13 @@ int perform_token_annotation(int argc, const char **argv) {
0, &start_line, &start_column);
clang_getInstantiationLocation(clang_getRangeEnd(extent),
0, &end_line, &end_column);
- printf("%s: \"%s\" [%d:%d - %d:%d]\n", kind, clang_getCString(spelling),
+ printf("%s: \"%s\" [%d:%d - %d:%d]", kind, clang_getCString(spelling),
start_line, start_column, end_line, end_column);
+ if (!clang_isInvalid(cursors[i].kind)) {
+ printf(" ");
+ PrintCursor(cursors[i]);
+ }
+ printf("\n");
}
free(cursors);
OpenPOWER on IntegriCloud