[libclang] Indexing API: Pass an implicit ObjCInterfaceDecl (@implementation without @interface)

in a separate indexing callback than its implementation.

llvm-svn: 144625
This commit is contained in:
Argyrios Kyrtzidis 2011-11-15 06:20:24 +00:00
parent ae8e792fe2
commit 233f12d9e2
2 changed files with 5 additions and 2 deletions

View File

@ -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();

View File

@ -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);
}