aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-04-23 17:22:07 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-04-23 17:22:07 +0000
commitca5cec3b5da9aa6b41c4aeccd0ee1c177825bca4 (patch)
tree022922f2c155712e13bc48455aaa854df88ffb92
parent17e1d35848247cbc5ff31df58f0b67e85b64837c (diff)
Trying to improve on a diagnostics for properties.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102187 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td4
-rw-r--r--test/SemaObjC/continuation-class-err.m6
2 files changed, 5 insertions, 5 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 16de2012c2..f61cd21795 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -323,8 +323,8 @@ def warn_atomic_property_rule : Warning<
"writable atomic property %0 cannot pair a synthesized setter/getter "
"with a user defined setter/getter">;
def err_use_continuation_class : Error<
- "property declaration in continuation class of %0 is to change a 'readonly' "
- "property to 'readwrite'">;
+ "illegal declaration of property in continuation class %0"
+ " - attribute must be readwrite, while its primary must be readonly">;
def err_continuation_class : Error<"continuation class has no primary class">;
def err_property_type : Error<"property cannot have array or function type %0">;
def error_missing_property_context : Error<
diff --git a/test/SemaObjC/continuation-class-err.m b/test/SemaObjC/continuation-class-err.m
index 214c4e5b30..9c14d37ced 100644
--- a/test/SemaObjC/continuation-class-err.m
+++ b/test/SemaObjC/continuation-class-err.m
@@ -12,7 +12,7 @@
@interface ReadOnly ()
@property(readwrite, copy) id object; // expected-warning {{property attribute in continuation class does not match the primary class}}
-@property(readonly) id object1; // expected-error {{property declaration in continuation class of 'ReadOnly' is to change a 'readonly' property to 'readwrite'}}
+@property(readonly) id object1; // expected-error {{illegal declaration of property in continuation class 'ReadOnly' - attribute must be}}
@property (readwrite, assign) int indentLevel; // OK. assign the the default in any case.
@end
@@ -31,8 +31,8 @@
@end
@interface Bar ()
-@property (copy) id foo; // expected-error {{property declaration in continuation class of 'Bar' is to change a 'readonly' property to 'readwrite'}}
-@property (copy) id fee; // expected-error {{property declaration in continuation class of 'Bar' is to change a 'readonly' property to 'readwrite'}}
+@property (copy) id foo; // expected-error {{illegal declaration of property in continuation class 'Bar' - attribute must be}}
+@property (copy) id fee; // expected-error {{illegal declaration of property in continuation class 'Bar' - attribute must be}}
@end
@implementation Bar