aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaObjCProperty.cpp
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
commitf224fb5de15e10cecd2d87fee73b0e39b503d924 (patch)
tree8b5114f30bb6e538e05039ed2cecb241f5030ae8 /lib/Sema/SemaObjCProperty.cpp
parentfa1ed8e6edd7381e3b27dd6536a6e4b72805748e (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164080 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--lib/Sema/SemaObjCProperty.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 131c48f012..0f6ae4c7c7 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/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);