diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-03 05:59:50 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-03 05:59:50 +0000 |
commit | bce6f62ae7d2c15992617f64e30067803fb5b47f (patch) | |
tree | 494ab2f9a3a923b93055f0710be6ce4e9efbf169 /tools/c-index-test/c-index-test.c | |
parent | cc318939daaa50fc07f7d431caec3c8679893e9c (diff) |
Revert "Visit function/method bodies and issue callback for parameters and local
variables.", this is breaking x86_64-apple-darwin10 and Linux tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80896 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/c-index-test/c-index-test.c')
-rw-r--r-- | tools/c-index-test/c-index-test.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c index 8df2fc261d..2d2be158d0 100644 --- a/tools/c-index-test/c-index-test.c +++ b/tools/c-index-test/c-index-test.c @@ -3,27 +3,25 @@ #include "clang-c/Index.h" #include <stdio.h> -static void PrintCursor(CXCursor Cursor) { - printf("%s => %s", clang_getCursorKindSpelling(Cursor.kind), - clang_getCursorSpelling(Cursor)); - printf(" (%s,%d:%d)\n", clang_getCursorSource(Cursor), - clang_getCursorLine(Cursor), - clang_getCursorColumn(Cursor)); -} - static void DeclVisitor(CXDecl Dcl, CXCursor Cursor, CXClientData Filter) { - printf("%s: ", clang_getDeclSpelling(Dcl)); - if (!Filter || (Cursor.kind == *(enum CXCursorKind *)Filter)) - PrintCursor(Cursor); + if (!Filter || (Cursor.kind == *(enum CXCursorKind *)Filter)) { + printf("%s => %s", clang_getCursorKindSpelling(Cursor.kind), + clang_getCursorSpelling(Cursor)); + printf(" (%s,%d:%d)\n", clang_getCursorSource(Cursor), + clang_getCursorLine(Cursor), + clang_getCursorColumn(Cursor)); + } } - static void TranslationUnitVisitor(CXTranslationUnit Unit, CXCursor Cursor, CXClientData Filter) { - printf("%s: ", clang_getTranslationUnitSpelling(Unit)); if (!Filter || (Cursor.kind == *(enum CXCursorKind *)Filter)) { - PrintCursor(Cursor); + printf("%s => %s", clang_getCursorKindSpelling(Cursor.kind), + clang_getCursorSpelling(Cursor)); + printf(" (%s,%d:%d)\n", clang_getCursorSource(Cursor), + clang_getCursorLine(Cursor), + clang_getCursorColumn(Cursor)); clang_loadDeclaration(Cursor.decl, DeclVisitor, 0); } |