summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/duplicate-property-class-extension.m
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
committerdim <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
commit39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch)
treea9243275843fbeaa590afc07ee888e006b8d54ea /test/SemaObjC/duplicate-property-class-extension.m
parent69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff)
downloadFreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip
FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
Diffstat (limited to 'test/SemaObjC/duplicate-property-class-extension.m')
-rw-r--r--test/SemaObjC/duplicate-property-class-extension.m15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/SemaObjC/duplicate-property-class-extension.m b/test/SemaObjC/duplicate-property-class-extension.m
index a84f83f..bf48ed6 100644
--- a/test/SemaObjC/duplicate-property-class-extension.m
+++ b/test/SemaObjC/duplicate-property-class-extension.m
@@ -1,21 +1,24 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// rdar://7629420
@interface Foo
-@property (readonly) char foo; // expected-note {{property declared here}}
+@property (readonly) char foo;
+@property (readwrite) char bar; // expected-note {{property declared here}}
@end
@interface Foo ()
-@property (readwrite) char foo; // OK
+@property (readwrite) char foo; // expected-note 2 {{property declared here}}
@property (readwrite) char NewProperty; // expected-note 2 {{property declared here}}
+@property (readwrite) char bar; // expected-error{{illegal redeclaration of 'readwrite' property in continuation class 'Foo' (perhaps you intended this to be a 'readwrite' redeclaration of a 'readonly' public property?)}}
@end
@interface Foo ()
-@property (readwrite) char foo; // OK again, make primary property readwrite for 2nd time!
-@property (readwrite) char NewProperty; // expected-error {{illegal declaration of property in continuation class 'Foo': attribute must be readwrite, while its primary must be readonly}}
+@property (readwrite) char foo; // expected-error {{property has a previous declaration}}
+@property (readwrite) char NewProperty; // expected-error {{property has a previous declaration}}
@end
@interface Foo ()
-@property (readonly) char foo; // expected-error {{illegal declaration of property in continuation class 'Foo': attribute must be readwrite, while its primary must be readonly}}
-@property (readwrite) char NewProperty; // expected-error {{illegal declaration of property in continuation class 'Foo': attribute must be readwrite, while its primary must be readonly}}
+@property (readonly) char foo; // expected-error {{property has a previous declaration}}
+@property (readwrite) char NewProperty; // expected-error {{property has a previous declaration}}
@end
OpenPOWER on IntegriCloud