aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/IndexDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-01 21:23:57 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-01 21:23:57 +0000
commitbd9482d859a74bf2c45ef8b8aedec61c0e1c8374 (patch)
tree827657aa0ed457521e505ae199c93c9166b7181f /tools/libclang/IndexDecl.cpp
parenta6387f3b447015073192f1e1cafec3ebd0294c8c (diff)
Eliminate ObjCForwardProtocolDecl, which is redundant now that
ObjCProtocolDecl modules forward declarations properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147415 91177308-0d34-0410-b5e6-96231b3b80d8
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;
}