Changed 'readonly' 'retain/copy' diagnostics into
warning as it is allowed in gcc and will break projects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60710 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 828e1fc..5e9e2b2 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1299,9 +1299,10 @@
(Attributes & ObjCDeclSpec::DQ_PR_copy) ?
"copy" : "retain";
- Diag(Loc, diag::err_objc_property_attr_mutually_exclusive)
+ Diag(Loc, (Attributes & (ObjCDeclSpec::DQ_PR_readwrite)) ?
+ diag::err_objc_property_attr_mutually_exclusive :
+ diag::warn_objc_property_attr_mutually_exclusive)
<< "readonly" << which;
- return;
}
// Check for copy or retain on non-object types.