Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDecl
covers both declarations (@class) and definitions (@interface) of an
Objective-C class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147299 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/IndexDecl.cpp b/tools/libclang/IndexDecl.cpp
index 96a21d8..3886813 100644
--- a/tools/libclang/IndexDecl.cpp
+++ b/tools/libclang/IndexDecl.cpp
@@ -77,11 +77,6 @@
return true;
}
- bool VisitObjCClassDecl(ObjCClassDecl *D) {
- IndexCtx.handleObjCClass(D);
- return true;
- }
-
bool VisitObjCForwardProtocolDecl(ObjCForwardProtocolDecl *D) {
ObjCForwardProtocolDecl::protocol_loc_iterator LI = D->protocol_loc_begin();
for (ObjCForwardProtocolDecl::protocol_iterator
@@ -96,14 +91,12 @@
}
bool VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) {
- // Forward decls are handled at VisitObjCClassDecl.
- if (!D->isThisDeclarationADefinition())
- return true;
-
IndexCtx.handleObjCInterface(D);
- IndexCtx.indexTUDeclsInObjCContainer();
- IndexCtx.indexDeclContext(D);
+ if (D->isThisDeclarationADefinition()) {
+ IndexCtx.indexTUDeclsInObjCContainer();
+ IndexCtx.indexDeclContext(D);
+ }
return true;
}