summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.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
commit0b144e160a3129708d1494e88d614cdce2867160 (patch)
treec4ff91808edb92affa8c3f001cfe092f9e59264d /clang/lib/Sema/SemaExpr.cpp
parentdb0f63e3452b58510cf3ef9678d3a9490652dd48 (diff)
downloadbcm5719-llvm-0b144e160a3129708d1494e88d614cdce2867160.tar.gz
bcm5719-llvm-0b144e160a3129708d1494e88d614cdce2867160.zip
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>. llvm-svn: 146618
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 8231cda75e7..c18d37df5f3 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -1975,7 +1975,7 @@ Sema::LookupInObjCMethod(LookupResult &Lookup, Scope *S,
// Diagnose the use of an ivar outside of the declaring class.
if (IV->getAccessControl() == ObjCIvarDecl::Private &&
- ClassDeclared != IFace)
+ !declaresSameEntity(ClassDeclared, IFace))
Diag(Loc, diag::error_private_ivar_access) << IV->getDeclName();
// FIXME: This should use a new expr for a direct reference, don't
@@ -2005,7 +2005,7 @@ Sema::LookupInObjCMethod(LookupResult &Lookup, Scope *S,
ObjCInterfaceDecl *ClassDeclared;
if (ObjCIvarDecl *IV = IFace->lookupInstanceVariable(II, ClassDeclared)) {
if (IV->getAccessControl() != ObjCIvarDecl::Private ||
- IFace == ClassDeclared)
+ declaresSameEntity(IFace, ClassDeclared))
Diag(Loc, diag::warn_ivar_use_hidden) << IV->getDeclName();
}
}
OpenPOWER on IntegriCloud