aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/IndexDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libclang/IndexDecl.cpp')
-rw-r--r--tools/libclang/IndexDecl.cpp23
1 files changed, 4 insertions, 19 deletions
diff --git a/tools/libclang/IndexDecl.cpp b/tools/libclang/IndexDecl.cpp
index ee37bba942..9ff65b30f4 100644
--- a/tools/libclang/IndexDecl.cpp
+++ b/tools/libclang/IndexDecl.cpp
@@ -77,19 +77,6 @@ public:
return true;
}
- bool VisitObjCForwardProtocolDecl(ObjCForwardProtocolDecl *D) {
- ObjCForwardProtocolDecl::protocol_loc_iterator LI = D->protocol_loc_begin();
- for (ObjCForwardProtocolDecl::protocol_iterator
- I = D->protocol_begin(), E = D->protocol_end(); I != E; ++I, ++LI) {
- SourceLocation Loc = *LI;
- ObjCProtocolDecl *PD = *I;
-
- bool isRedeclaration = PD->getLocation() != Loc;
- IndexCtx.handleObjCForwardProtocol(PD, Loc, isRedeclaration);
- }
- return true;
- }
-
bool VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) {
IndexCtx.handleObjCInterface(D);
@@ -101,14 +88,12 @@ public:
}
bool VisitObjCProtocolDecl(ObjCProtocolDecl *D) {
- // Forward decls are handled at VisitObjCForwardProtocolDecl.
- if (!D->isThisDeclarationADefinition())
- return true;
-
IndexCtx.handleObjCProtocol(D);
- IndexCtx.indexTUDeclsInObjCContainer();
- IndexCtx.indexDeclContext(D);
+ if (D->isThisDeclarationADefinition()) {
+ IndexCtx.indexTUDeclsInObjCContainer();
+ IndexCtx.indexDeclContext(D);
+ }
return true;
}