Objective-C: In my last path, also check
for existence of user setter before
issuing the warning about non-synthesizable
property. // rdar://13388503
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176906 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 2195541..aae8ae6 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -1589,7 +1589,8 @@
ObjCPropertyDecl *PropInSuperClass = SuperPropMap[Prop->getIdentifier()];
if ((Prop->getPropertyAttributes() & ObjCPropertyDecl::OBJC_PR_readwrite) &&
(PropInSuperClass->getPropertyAttributes() &
- ObjCPropertyDecl::OBJC_PR_readonly)) {
+ ObjCPropertyDecl::OBJC_PR_readonly) &&
+ !IMPDecl->getInstanceMethod(Prop->getSetterName())) {
Diag(Prop->getLocation(), diag::warn_no_autosynthesis_property)
<< Prop->getIdentifier()->getName();
Diag(PropInSuperClass->getLocation(), diag::note_property_declare);