diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-26 18:31:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-26 18:31:56 +0000 |
commit | 6165611986de4036a393bdafa743fa35d03fccfc (patch) | |
tree | 8c060a0b85b6fd7741c555013e5f0432c76e89c3 /clang/tools/c-index-test/c-index-test.c | |
parent | 1c7e3837fb3749b334ab718566f7c95a68d46b74 (diff) | |
download | bcm5719-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.c | 7 |
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); |