aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 828e1fc8c6..5e9e2b21e2 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1299,9 +1299,10 @@ void Sema::CheckObjCPropertyAttributes(QualType PropertyTy,
(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.