зеркало из https://github.com/microsoft/clang-1.git
[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
This commit is contained in:
Родитель
40f57ee2da
Коммит
e7bbab91f5
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче