[cfe-commits] r64657 - in /cfe/trunk: include/clang/AST/DeclObjC.h lib/AST/DeclObjC.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclObjC.cpp
Fariborz Jahanian
fjahanian at apple.com
Mon Feb 16 11:35:27 PST 2009
Author: fjahanian
Date: Mon Feb 16 13:35:27 2009
New Revision: 64657
URL: http://llvm.org/viewvc/llvm-project?rev=64657&view=rev
Log:
Remove FindIvarDeclaration. Use lookupInstanceVariable is is functionally
the same.
Modified:
cfe/trunk/include/clang/AST/DeclObjC.h
cfe/trunk/lib/AST/DeclObjC.cpp
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=64657&r1=64656&r2=64657&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Mon Feb 16 13:35:27 2009
@@ -407,7 +407,6 @@
}
ObjCCategoryDecl *FindCategoryDeclaration(IdentifierInfo *CategoryId) const;
- ObjCIvarDecl *FindIvarDeclaration(IdentifierInfo *IvarId) const;
typedef ObjCList<ObjCProtocolDecl>::iterator protocol_iterator;
protocol_iterator protocol_begin() const {return ReferencedProtocols.begin();}
Modified: cfe/trunk/lib/AST/DeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclObjC.cpp?rev=64657&r1=64656&r2=64657&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclObjC.cpp (original)
+++ cfe/trunk/lib/AST/DeclObjC.cpp Mon Feb 16 13:35:27 2009
@@ -233,22 +233,6 @@
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.
///
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=64657&r1=64656&r2=64657&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Mon Feb 16 13:35:27 2009
@@ -3660,7 +3660,7 @@
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);
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=64657&r1=64656&r2=64657&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Mon Feb 16 13:35:27 2009
@@ -1698,7 +1698,7 @@
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;
More information about the cfe-commits
mailing list