From a5063a620847de422e64c330ed5d07718583bf9c Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Wed, 8 Aug 2012 16:41:04 +0000 Subject: objc: Include all types when issuing warning under -Wdirect-ivar-access. llvm-svn: 161500 --- clang/lib/Sema/SemaExpr.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'clang/lib/Sema/SemaExpr.cpp') 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)); -- cgit v1.2.3