diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-15 21:56:13 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-15 21:56:13 +0000 |
commit | c58d05bcf92c41e6c04fcd4528cfba2f4cc0c5c8 (patch) | |
tree | fec754aeb885a1f00d7cc42956e1412ad6ae16c1 /clang/tools/c-index-test/c-index-test.c | |
parent | e0da4b6cff23db0690976b90e412614ca70adc40 (diff) | |
download | bcm5719-llvm-c58d05bcf92c41e6c04fcd4528cfba2f4cc0c5c8.tar.gz bcm5719-llvm-c58d05bcf92c41e6c04fcd4528cfba2f4cc0c5c8.zip |
Make CXCursor's data opaque.
llvm-svn: 93561
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index 727ad66d574..a689dc54e11 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -111,11 +111,11 @@ static void TranslationUnitVisitor(CXTranslationUnit Unit, CXCursor Cursor, basename(clang_getCString(string))); clang_disposeString(string); - PrintDeclExtent(Cursor.decl); + PrintDeclExtent(Cursor.data[0]); printf("\n"); - clang_loadDeclaration(Cursor.decl, DeclVisitor, 0); + clang_loadDeclaration(Cursor.data[0], DeclVisitor, 0); } } @@ -152,7 +152,7 @@ static void FunctionScanVisitor(CXTranslationUnit Unit, CXCursor Cursor, printf("// %s: %s:%d:%d: ", FileCheckPrefix, GetCursorSource(Ref), curLine, curColumn); PrintCursor(Ref); - string = clang_getDeclSpelling(Ref.decl); + string = clang_getDeclSpelling(Ref.data[0]); printf(" [Context:%s]\n", clang_getCString(string)); clang_disposeString(string); } @@ -166,13 +166,13 @@ static void FunctionScanVisitor(CXTranslationUnit Unit, CXCursor Cursor, static void USRDeclVisitor(CXDecl D, CXCursor C, CXClientData Filter) { if (!Filter || (C.kind == *(enum CXCursorKind *)Filter)) { - CXString USR = clang_getDeclUSR(C.decl); + CXString USR = clang_getDeclUSR(C.data[0]); if (!USR.Spelling) { clang_disposeString(USR); return; } printf("// %s: %s %s", FileCheckPrefix, GetCursorSource(C), USR.Spelling); - PrintDeclExtent(C.decl); + PrintDeclExtent(C.data[0]); printf("\n"); clang_disposeString(USR); } @@ -180,9 +180,9 @@ static void USRDeclVisitor(CXDecl D, CXCursor C, CXClientData Filter) { static void USRVisitor(CXTranslationUnit Unit, CXCursor Cursor, CXClientData Filter) { - if (Cursor.decl) { + if (Cursor.data[0]) { /* USRDeclVisitor(Unit, Cursor.decl, Cursor, Filter);*/ - clang_loadDeclaration(Cursor.decl, USRDeclVisitor, 0); + clang_loadDeclaration(Cursor.data[0], USRDeclVisitor, 0); } } |