aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-26 04:13:19 +0000
committerChris Lattner <sabre@nondot.org>2008-07-26 04:13:19 +0000
commit06036d3709955a53297b4cbe14e20db88f321470 (patch)
tree22bcc47363b36a463d0423eadf6dfefd57f4f275 /lib/Sema/SemaDeclObjC.cpp
parent6bd6d0b9d8944c5e192097bef24f2becb83af172 (diff)
Pull protocol resolution of out ActOnStartClassInterface, this is also the
last client of the old ParseObjCProtocolReferences, so it also removes it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 570437d071..07cc890fde 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -75,8 +75,7 @@ Sema::DeclTy *Sema::
ActOnStartClassInterface(SourceLocation AtInterfaceLoc,
IdentifierInfo *ClassName, SourceLocation ClassLoc,
IdentifierInfo *SuperName, SourceLocation SuperLoc,
- const IdentifierLocPair *ProtocolNames,
- unsigned NumProtocols,
+ DeclTy * const *ProtoRefs, unsigned NumProtoRefs,
SourceLocation EndProtoLoc, AttributeList *AttrList) {
assert(ClassName && "Missing class identifier");
@@ -134,22 +133,8 @@ ActOnStartClassInterface(SourceLocation AtInterfaceLoc,
}
/// Check then save referenced protocols
- if (NumProtocols) {
- llvm::SmallVector<ObjCProtocolDecl*, 8> RefProtos;
- for (unsigned int i = 0; i != NumProtocols; i++) {
- ObjCProtocolDecl* RefPDecl = ObjCProtocols[ProtocolNames[i].first];
- if (!RefPDecl)
- Diag(ProtocolNames[i].second, diag::err_undeclared_protocol,
- ProtocolNames[i].first->getName());
- else {
- if (RefPDecl->isForwardDecl())
- Diag(ProtocolNames[i].second, diag::warn_undef_protocolref,
- ProtocolNames[i].first->getName());
- RefProtos.push_back(RefPDecl);
- }
- }
- if (!RefProtos.empty())
- IDecl->addReferencedProtocols(&RefProtos[0], RefProtos.size());
+ if (NumProtoRefs) {
+ IDecl->addReferencedProtocols((ObjCProtocolDecl**)ProtoRefs, NumProtoRefs);
IDecl->setLocEnd(EndProtoLoc);
}
return IDecl;