diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-15 00:29:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-15 00:29:59 +0000 |
commit | 60ef308e51c71b760d7f598c1b763ceb7b768148 (patch) | |
tree | ffdc4265cafc6594b04a4d36f629da15a892aa17 /lib/Sema/SemaObjCProperty.cpp | |
parent | 643d3ce93c501d19353f2fa578fee3e97f1d1b4b (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.cpp | 4 |
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(); |