aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-16 15:34:59 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-16 15:34:59 +0000
commite396c7bd99ed99fd8136fadc8945791754c61b16 (patch)
treeb287320040ba43c06a32c78f27118f13ea7dcd7a /lib/Sema/SemaCodeComplete.cpp
parentc7b6d883360092808b0ae81b7829fa8196ef42a1 (diff)
When collecting Objective-C methods for message send completions, be
sure to visit the protocols of protocols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--lib/Sema/SemaCodeComplete.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index 3ec68029b2..615d126fb3 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -3869,6 +3869,17 @@ static void AddObjCMethods(ObjCContainerDecl *Container,
}
}
+ // Visit the protocols of protocols.
+ if (ObjCProtocolDecl *Protocol = dyn_cast<ObjCProtocolDecl>(Container)) {
+ const ObjCList<ObjCProtocolDecl> &Protocols
+ = Protocol->getReferencedProtocols();
+ for (ObjCList<ObjCProtocolDecl>::iterator I = Protocols.begin(),
+ E = Protocols.end();
+ I != E; ++I)
+ AddObjCMethods(*I, WantInstanceMethods, WantKind, SelIdents, NumSelIdents,
+ CurContext, Results, false);
+ }
+
ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>(Container);
if (!IFace)
return;