summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-03 05:59:50 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-03 05:59:50 +0000
commit3a0637b06b9fdd656827aa52e4de2084b9b507ae (patch)
treec3d0e2485fb4c7daf8c45927e207c5f2dc86e9f3 /clang/tools/c-index-test
parent2d9c740cc53d4885a8fbc536416f81f7e531e838 (diff)
downloadbcm5719-llvm-3a0637b06b9fdd656827aa52e4de2084b9b507ae.tar.gz
bcm5719-llvm-3a0637b06b9fdd656827aa52e4de2084b9b507ae.zip
Revert "Visit function/method bodies and issue callback for parameters and local
variables.", this is breaking x86_64-apple-darwin10 and Linux tests. llvm-svn: 80896
Diffstat (limited to 'clang/tools/c-index-test')
-rw-r--r--clang/tools/c-index-test/c-index-test.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index 8df2fc261dc..2d2be158d06 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/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);
}
OpenPOWER on IntegriCloud