aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-12-15 00:29:59 +0000
committerDouglas Gregor <dgregor@apple.com>2011-12-15 00:29:59 +0000
commit60ef308e51c71b760d7f598c1b763ceb7b768148 (patch)
treeffdc4265cafc6594b04a4d36f629da15a892aa17 /lib/Sema/SemaObjCProperty.cpp
parent643d3ce93c501d19353f2fa578fee3e97f1d1b4b (diff)
Replace all comparisons between ObjCInterfaceDecl pointers with calls
to declaresSameEntity(), as a baby step toward tracking forward declarations of Objective-C classes precisely. Part of <rdar://problem/10583531>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146618 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--lib/Sema/SemaObjCProperty.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index e754e73377..7436745ad9 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -690,7 +690,7 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S,
// Note! I deliberately want it to fall thru so, we have a
// a property implementation and to avoid future warnings.
} else if (getLangOptions().ObjCNonFragileABI &&
- ClassDeclared != IDecl) {
+ !declaresSameEntity(ClassDeclared, IDecl)) {
Diag(PropertyLoc, diag::error_ivar_in_superclass_use)
<< property->getDeclName() << Ivar->getDeclName()
<< ClassDeclared->getDeclName();
@@ -870,7 +870,7 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S,
}
// Issue diagnostics only if Ivar belongs to current class.
if (Ivar && Ivar->getSynthesize() &&
- IC->getClassInterface() == ClassDeclared) {
+ declaresSameEntity(IC->getClassInterface(), ClassDeclared)) {
Diag(Ivar->getLocation(), diag::err_undeclared_var_use)
<< PropertyId;
Ivar->setInvalidDecl();