diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-16 20:19:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-16 20:19:15 +0000 |
commit | c858105d41602a2dadb2efbc1af80a7b791ebac3 (patch) | |
tree | 3f2bc9d3680e813b3d64a07f840977cc6870b93b /lib/Sema/SemaDeclObjC.cpp | |
parent | 439e71f4be0148101281f72f10c9f8bf743e78bd (diff) |
minor cleanups, make getNumInstanceMethods always return unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48423 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 3b8baea519..28a92c7ba2 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -214,12 +214,13 @@ Sema::DeclTy *Sema::ActOnStartProtocolInterface( PDecl->AllocReferencedProtocols(NumProtoRefs); } else { PDecl = ObjCProtocolDecl::Create(Context, AtProtoInterfaceLoc, NumProtoRefs, - ProtocolName, false); + ProtocolName); + PDecl->setForwardDecl(false); ObjCProtocols[ProtocolName] = PDecl; } if (NumProtoRefs) { - /// Check then save referenced protocols + /// Check then save referenced protocols. for (unsigned int i = 0; i != NumProtoRefs; i++) { ObjCProtocolDecl* RefPDecl = ObjCProtocols[ProtoRefNames[i]]; if (!RefPDecl || RefPDecl->isForwardDecl()) @@ -258,12 +259,11 @@ Sema::ActOnForwardProtocolDeclaration(SourceLocation AtProtocolLoc, llvm::SmallVector<ObjCProtocolDecl*, 32> Protocols; for (unsigned i = 0; i != NumElts; ++i) { - IdentifierInfo *P = IdentList[i]; - ObjCProtocolDecl *PDecl = ObjCProtocols[P]; - if (!PDecl) { // Not already seen? + IdentifierInfo *Ident = IdentList[i]; + ObjCProtocolDecl *&PDecl = ObjCProtocols[Ident]; + if (PDecl == 0) { // Not already seen? // FIXME: Pass in the location of the identifier! - PDecl = ObjCProtocolDecl::Create(Context, AtProtocolLoc, 0, P, true); - ObjCProtocols[P] = PDecl; + PDecl = ObjCProtocolDecl::Create(Context, AtProtocolLoc, 0, Ident); } Protocols.push_back(PDecl); |