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 | acc04a9261fcbedf2687a44795209b26c0de318e (patch) | |
| tree | 34dab620afc2592be13a4b3be68bb6f87ae4c6b5 /clang/lib/Sema/SemaDeclObjC.cpp | |
| parent | ab4b7d36cdb4b234073d5081c1fa6748bc640e09 (diff) | |
| download | bcm5719-llvm-acc04a9261fcbedf2687a44795209b26c0de318e.tar.gz bcm5719-llvm-acc04a9261fcbedf2687a44795209b26c0de318e.zip | |
minor cleanups, make getNumInstanceMethods always return unsigned.
llvm-svn: 48423
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 3b8baea519f..28a92c7ba26 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/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); |

