forked from OSchip/llvm-project
Remove FindIvarDeclaration. Use lookupInstanceVariable is is functionally
the same. llvm-svn: 64657
This commit is contained in:
parent
1460431e37
commit
7a855e33df
|
@ -407,7 +407,6 @@ public:
|
|||
}
|
||||
|
||||
ObjCCategoryDecl *FindCategoryDeclaration(IdentifierInfo *CategoryId) const;
|
||||
ObjCIvarDecl *FindIvarDeclaration(IdentifierInfo *IvarId) const;
|
||||
|
||||
typedef ObjCList<ObjCProtocolDecl>::iterator protocol_iterator;
|
||||
protocol_iterator protocol_begin() const {return ReferencedProtocols.begin();}
|
||||
|
|
|
@ -233,22 +233,6 @@ ObjCCategoryDecl *
|
|||
return 0;
|
||||
}
|
||||
|
||||
/// FindIvarDeclaration - Find an Ivar declaration in this class given its
|
||||
/// name in 'IvarId'. On failure to find, return 0;
|
||||
///
|
||||
ObjCIvarDecl *
|
||||
ObjCInterfaceDecl::FindIvarDeclaration(IdentifierInfo *IvarId) const {
|
||||
for (ObjCInterfaceDecl::ivar_iterator IVI = ivar_begin(),
|
||||
IVE = ivar_end(); IVI != IVE; ++IVI) {
|
||||
ObjCIvarDecl* Ivar = (*IVI);
|
||||
if (Ivar->getIdentifier() == IvarId)
|
||||
return Ivar;
|
||||
}
|
||||
if (getSuperClass())
|
||||
return getSuperClass()->FindIvarDeclaration(IvarId);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// ObjCAddInstanceVariablesToClass - Inserts instance variables
|
||||
/// into ObjCInterfaceDecl's fields.
|
||||
///
|
||||
|
|
|
@ -3660,7 +3660,7 @@ void Sema::ActOnFields(Scope* S,
|
|||
IVE = ID->ivar_end(); IVI != IVE; ++IVI) {
|
||||
ObjCIvarDecl* Ivar = (*IVI);
|
||||
IdentifierInfo *II = Ivar->getIdentifier();
|
||||
ObjCIvarDecl* prevIvar = ID->getSuperClass()->FindIvarDeclaration(II);
|
||||
ObjCIvarDecl* prevIvar = ID->getSuperClass()->lookupInstanceVariable(II);
|
||||
if (prevIvar) {
|
||||
Diag(Ivar->getLocation(), diag::err_duplicate_member) << II;
|
||||
Diag(prevIvar->getLocation(), diag::note_previous_declaration);
|
||||
|
|
|
@ -1698,7 +1698,7 @@ Sema::DeclTy *Sema::ActOnPropertyImplDecl(SourceLocation AtLoc,
|
|||
if (!PropertyIvar)
|
||||
PropertyIvar = PropertyId;
|
||||
// Check that this is a previously declared 'ivar' in 'IDecl' interface
|
||||
Ivar = IDecl->FindIvarDeclaration(PropertyIvar);
|
||||
Ivar = IDecl->lookupInstanceVariable(PropertyIvar);
|
||||
if (!Ivar) {
|
||||
Diag(PropertyLoc, diag::error_missing_property_ivar_decl) << PropertyId;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue