diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-06-27 20:52:46 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-06-27 20:52:46 +0000 |
commit | 7c16d58f8546365d1f56468e9ae1ecfa182afca0 (patch) | |
tree | 548b488c5e1e2a1507e91b63be5eaeedfb8f075a /lib/Sema/SemaObjCProperty.cpp | |
parent | e1971a136a75e6722059d759d9700e411f63f344 (diff) |
objective-c mrc: Issue warning for mrc, as is done for arc, when
property retains a block object as it could be on
the stack. // rdar://11761511
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159293 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index 13350eaf37..1794f6618a 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -2143,8 +2143,7 @@ void Sema::CheckObjCPropertyAttributes(Decl *PDecl, && getLangOpts().getGC() == LangOptions::GCOnly && PropertyTy->isBlockPointerType()) Diag(Loc, diag::warn_objc_property_copy_missing_on_block); - else if (getLangOpts().ObjCAutoRefCount && - (Attributes & ObjCDeclSpec::DQ_PR_retain) && + else if ((Attributes & ObjCDeclSpec::DQ_PR_retain) && !(Attributes & ObjCDeclSpec::DQ_PR_readonly) && !(Attributes & ObjCDeclSpec::DQ_PR_strong) && PropertyTy->isBlockPointerType()) |