[libclang] Indexing API: Pass an implicit ObjCInterfaceDecl (@implementation without @interface)
in a separate indexing callback than its implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144625 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/IndexDecl.cpp b/tools/libclang/IndexDecl.cpp
index 67f6703..b2a4530 100644
--- a/tools/libclang/IndexDecl.cpp
+++ b/tools/libclang/IndexDecl.cpp
@@ -108,6 +108,10 @@
}
bool VisitObjCImplementationDecl(ObjCImplementationDecl *D) {
+ const ObjCInterfaceDecl *Class = D->getClassInterface();
+ if (Class->isImplicitInterfaceDecl())
+ IndexCtx.handleObjCInterface(Class);
+
IndexCtx.handleObjCImplementation(D);
IndexCtx.indexTUDeclsInObjCContainer();