diff options
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index b636e29945..fcf9a92aca 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -65,7 +65,7 @@ ActOnStartClassInterface(SourceLocation AtInterfaceLoc, assert(ClassName && "Missing class identifier"); // Check for another declaration kind with the same name. - Decl *PrevDecl = LookupDecl(ClassName, Decl::IDNS_Ordinary, TUScope); + Decl *PrevDecl = LookupDeclInScope(ClassName, Decl::IDNS_Ordinary, TUScope); if (PrevDecl && PrevDecl->isTemplateParameter()) { // Maybe we will complain about the shadowed template parameter. DiagnoseTemplateParameterShadow(ClassLoc, PrevDecl); @@ -108,7 +108,7 @@ ActOnStartClassInterface(SourceLocation AtInterfaceLoc, if (SuperName) { ObjCInterfaceDecl* SuperClassEntry = 0; // Check if a different kind of symbol declared in this scope. - PrevDecl = LookupDecl(SuperName, Decl::IDNS_Ordinary, TUScope); + PrevDecl = LookupDeclInScope(SuperName, Decl::IDNS_Ordinary, TUScope); if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) { Diag(SuperLoc, diag::err_redefinition_different_kind) << SuperName; Diag(PrevDecl->getLocation(), diag::note_previous_definition); @@ -150,7 +150,7 @@ Sema::DeclTy *Sema::ActOnCompatiblityAlias(SourceLocation AtLoc, IdentifierInfo *ClassName, SourceLocation ClassLocation) { // Look for previous declaration of alias name - Decl *ADecl = LookupDecl(AliasName, Decl::IDNS_Ordinary, TUScope); + Decl *ADecl = LookupDeclInScope(AliasName, Decl::IDNS_Ordinary, TUScope); if (ADecl) { if (isa<ObjCCompatibleAliasDecl>(ADecl)) Diag(AliasLocation, diag::warn_previous_alias_decl); @@ -160,13 +160,13 @@ Sema::DeclTy *Sema::ActOnCompatiblityAlias(SourceLocation AtLoc, return 0; } // Check for class declaration - Decl *CDeclU = LookupDecl(ClassName, Decl::IDNS_Ordinary, TUScope); + Decl *CDeclU = LookupDeclInScope(ClassName, Decl::IDNS_Ordinary, TUScope); if (const TypedefDecl *TDecl = dyn_cast_or_null<TypedefDecl>(CDeclU)) { QualType T = TDecl->getUnderlyingType(); if (T->isObjCInterfaceType()) { if (NamedDecl *IDecl = T->getAsObjCInterfaceType()->getDecl()) { ClassName = IDecl->getIdentifier(); - CDeclU = LookupDecl(ClassName, Decl::IDNS_Ordinary, TUScope); + CDeclU = LookupDeclInScope(ClassName, Decl::IDNS_Ordinary, TUScope); } } } @@ -536,7 +536,7 @@ Sema::DeclTy *Sema::ActOnStartClassImplementation( SourceLocation SuperClassLoc) { ObjCInterfaceDecl* IDecl = 0; // Check for another declaration kind with the same name. - Decl *PrevDecl = LookupDecl(ClassName, Decl::IDNS_Ordinary, TUScope); + Decl *PrevDecl = LookupDeclInScope(ClassName, Decl::IDNS_Ordinary, TUScope); if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) { Diag(ClassLoc, diag::err_redefinition_different_kind) << ClassName; Diag(PrevDecl->getLocation(), diag::note_previous_definition); @@ -552,7 +552,7 @@ Sema::DeclTy *Sema::ActOnStartClassImplementation( ObjCInterfaceDecl* SDecl = 0; if (SuperClassname) { // Check if a different kind of symbol declared in this scope. - PrevDecl = LookupDecl(SuperClassname, Decl::IDNS_Ordinary, TUScope); + PrevDecl = LookupDeclInScope(SuperClassname, Decl::IDNS_Ordinary, TUScope); if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) { Diag(SuperClassLoc, diag::err_redefinition_different_kind) << SuperClassname; @@ -910,7 +910,7 @@ Sema::ActOnForwardClassDeclaration(SourceLocation AtClassLoc, for (unsigned i = 0; i != NumElts; ++i) { // Check for another declaration kind with the same name. - Decl *PrevDecl = LookupDecl(IdentList[i], Decl::IDNS_Ordinary, TUScope); + Decl *PrevDecl = LookupDeclInScope(IdentList[i], Decl::IDNS_Ordinary, TUScope); if (PrevDecl && PrevDecl->isTemplateParameter()) { // Maybe we will complain about the shadowed template parameter. DiagnoseTemplateParameterShadow(AtClassLoc, PrevDecl); |