aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-08-07 23:48:10 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-08-07 23:48:10 +0000
commitb25466e8b33285a13d0303461db37e903ec505c1 (patch)
tree59963d07033f1d7f310d7d29362c0c28040d0bcf /lib/Sema/SemaExpr.cpp
parent0e2a86802be7f888c29adf09fe23ad35bc6fb35d (diff)
objc-arc: Make -Wdirect-ivar-access accessible to all
memory models, except when arc is accessing a weak ivar (which is an error). // rdar://6505197 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index c62df00a87..5bc82c7394 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -1961,9 +1961,7 @@ Sema::LookupInObjCMethod(LookupResult &Lookup, Scope *S,
return ExprError();
MarkAnyDeclReferenced(Loc, IV);
- if (IV->getType()->isObjCObjectPointerType() &&
- getLangOpts().getGC() == LangOptions::NonGC &&
- !getLangOpts().ObjCAutoRefCount) {
+ if (IV->getType()->isObjCObjectPointerType()) {
ObjCMethodFamily MF = CurMethod->getMethodFamily();
if (MF != OMF_init && MF != OMF_dealloc && MF != OMF_finalize)
Diag(Loc, diag::warn_direct_ivar_access) << IV->getDeclName();