summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-05-07 23:06:50 +0000
committerMike Stump <mrs@apple.com>2009-05-07 23:06:50 +0000
commit5580bdcaa2d4fd8e12ef3c46b47fad4b85e32e53 (patch)
tree5fb6faa211699091f0147eb0bd59169c88c68395 /clang/lib
parent81ded6951180caf4bccaef638f31fabcfab0627d (diff)
downloadbcm5719-llvm-5580bdcaa2d4fd8e12ef3c46b47fad4b85e32e53.tar.gz
bcm5719-llvm-5580bdcaa2d4fd8e12ef3c46b47fad4b85e32e53.zip
Add a warning for a missing copy attribute on a property that is a
block pointer. Radar 6441502 llvm-svn: 71190
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 27f127716e5..e35b7a919b4 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -1750,6 +1750,11 @@ void Sema::CheckObjCPropertyAttributes(QualType PropertyTy,
// <rdar://5168496&4855821&5607453&5096644&4947311&5698469&4947014&5168496>
// (please trim this list while you are at it).
}
+
+ if (!(Attributes & ObjCDeclSpec::DQ_PR_copy)
+ && getLangOptions().getGCMode() == LangOptions::GCOnly
+ && PropertyTy->isBlockPointerType())
+ Diag(Loc, diag::warn_objc_property_copy_missing_on_block);
}
Sema::DeclPtrTy Sema::ActOnProperty(Scope *S, SourceLocation AtLoc,
OpenPOWER on IntegriCloud