diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-08-08 16:41:04 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-08-08 16:41:04 +0000 |
commit | a5063a620847de422e64c330ed5d07718583bf9c (patch) | |
tree | 7c436fd3793a41deb680c8702dc8cf2798db89a1 /clang/lib/Sema/SemaExpr.cpp | |
parent | 4577cd30363b10b8a2e25b80e8203d1702442b84 (diff) | |
download | bcm5719-llvm-a5063a620847de422e64c330ed5d07718583bf9c.tar.gz bcm5719-llvm-a5063a620847de422e64c330ed5d07718583bf9c.zip |
objc: Include all types when issuing warning under
-Wdirect-ivar-access.
llvm-svn: 161500
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 5bc82c7394c..bfe72423e1e 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1961,11 +1961,10 @@ Sema::LookupInObjCMethod(LookupResult &Lookup, Scope *S, return ExprError(); MarkAnyDeclReferenced(Loc, IV); - 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(); - } + + ObjCMethodFamily MF = CurMethod->getMethodFamily(); + if (MF != OMF_init && MF != OMF_dealloc && MF != OMF_finalize) + Diag(Loc, diag::warn_direct_ivar_access) << IV->getDeclName(); return Owned(new (Context) ObjCIvarRefExpr(IV, IV->getType(), Loc, SelfExpr.take(), true, true)); |