summaryrefslogtreecommitdiffstats
path: root/clang/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
commit285a7cc721c84fce7c7b4e9f33a1bd77d6e4f0f1 (patch)
tree86d9ec43d29d39d448d257bb2a0e1c091ef9a8b7 /clang/lib/Sema/SemaExpr.cpp
parent42032fafe489893f86fa2d6d39a00a0fb1ccd48a (diff)
downloadbcm5719-llvm-285a7cc721c84fce7c7b4e9f33a1bd77d6e4f0f1.tar.gz
bcm5719-llvm-285a7cc721c84fce7c7b4e9f33a1bd77d6e4f0f1.zip
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 llvm-svn: 161458
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index c62df00a875..5bc82c7394c 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud