diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-15 06:20:24 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-15 06:20:24 +0000 |
commit | 233f12d9e295169656d63e3e35efdd4cb70e7e17 (patch) | |
tree | 416b731ebb42ae50ad83532f62ac386b0833c3df /clang/tools | |
parent | ae8e792fe251454a2a991fe862159ee2d0dc5ab4 (diff) | |
download | bcm5719-llvm-233f12d9e295169656d63e3e35efdd4cb70e7e17.tar.gz bcm5719-llvm-233f12d9e295169656d63e3e35efdd4cb70e7e17.zip |
[libclang] Indexing API: Pass an implicit ObjCInterfaceDecl (@implementation without @interface)
in a separate indexing callback than its implementation.
llvm-svn: 144625
Diffstat (limited to 'clang/tools')
-rw-r--r-- | clang/tools/libclang/IndexDecl.cpp | 4 | ||||
-rw-r--r-- | clang/tools/libclang/IndexingContext.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/clang/tools/libclang/IndexDecl.cpp b/clang/tools/libclang/IndexDecl.cpp index 67f6703e75a..b2a45306dc9 100644 --- a/clang/tools/libclang/IndexDecl.cpp +++ b/clang/tools/libclang/IndexDecl.cpp @@ -108,6 +108,10 @@ public: } bool VisitObjCImplementationDecl(ObjCImplementationDecl *D) { + const ObjCInterfaceDecl *Class = D->getClassInterface(); + if (Class->isImplicitInterfaceDecl()) + IndexCtx.handleObjCInterface(Class); + IndexCtx.handleObjCImplementation(D); IndexCtx.indexTUDeclsInObjCContainer(); diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp index 3ab29e2e5bf..a6e968b8fe0 100644 --- a/clang/tools/libclang/IndexingContext.cpp +++ b/clang/tools/libclang/IndexingContext.cpp @@ -206,9 +206,8 @@ void IndexingContext::handleObjCInterface(const ObjCInterfaceDecl *D) { void IndexingContext::handleObjCImplementation( const ObjCImplementationDecl *D) { - const ObjCInterfaceDecl *Class = D->getClassInterface(); ObjCContainerDeclInfo ContDInfo(/*isForwardRef=*/false, - /*isRedeclaration=*/!Class->isImplicitInterfaceDecl(), + /*isRedeclaration=*/true, /*isImplementation=*/true); handleObjCContainer(D, D->getLocation(), getCursor(D), ContDInfo); } |