summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-09-17 23:57:35 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-09-17 23:57:35 +0000
commitcfb00a4137286c11c0c6ac4f3e480124f7aaa400 (patch)
treee80f21939fc4018eb403e1fa1ad06b8a71df02c2 /clang/lib
parent8439c78fa5a17a0f7f94e585b65c81dc37092a8e (diff)
downloadbcm5719-llvm-cfb00a4137286c11c0c6ac4f3e480124f7aaa400.tar.gz
bcm5719-llvm-cfb00a4137286c11c0c6ac4f3e480124f7aaa400.zip
objective-C: don't warn about class extension property's
missing 'assign' attribute as it is determined by its overridden property in primary class. // rdar://12214070 llvm-svn: 164080
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaObjCProperty.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index 131c48f0125..0f6ae4c7c7e 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/lib/Sema/SemaObjCProperty.cpp
@@ -2159,7 +2159,9 @@ void Sema::CheckObjCPropertyAttributes(Decl *PDecl,
// issue any warning.
if (isAnyClassTy && getLangOpts().getGC() == LangOptions::NonGC)
;
- else {
+ else if (propertyInPrimaryClass) {
+ // Don't issue warning on property with no life time in class
+ // extension as it is inherited from property in primary class.
// Skip this warning in gc-only mode.
if (getLangOpts().getGC() != LangOptions::GCOnly)
Diag(Loc, diag::warn_objc_property_no_assignment_attribute);
OpenPOWER on IntegriCloud