summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/duplicate-property-class-extension.m
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-02-15 21:55:26 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-02-15 21:55:26 +0000
commit30a42923d3c744725569ed11393ab5c40e543085 (patch)
tree2afe11b975a1784989cccaf36fa4cdb95cac020a /clang/test/SemaObjC/duplicate-property-class-extension.m
parent62f864dea32dd938ee9f6827faa4056a84d69295 (diff)
downloadbcm5719-llvm-30a42923d3c744725569ed11393ab5c40e543085.tar.gz
bcm5719-llvm-30a42923d3c744725569ed11393ab5c40e543085.zip
Class continuation now has its own property ast for
those declared in it. This is to allow duplicate property diagnostics for properties declared in class extensions multiple times (radar 7629420) and for future use. llvm-svn: 96276
Diffstat (limited to 'clang/test/SemaObjC/duplicate-property-class-extension.m')
-rw-r--r--clang/test/SemaObjC/duplicate-property-class-extension.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/duplicate-property-class-extension.m b/clang/test/SemaObjC/duplicate-property-class-extension.m
new file mode 100644
index 00000000000..bdf4786c76e
--- /dev/null
+++ b/clang/test/SemaObjC/duplicate-property-class-extension.m
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+@interface Foo
+@property (readonly) char foo;
+@end
+
+@interface Foo ()
+@property (readwrite) char foo; // expected-note {{property declared here}}
+@end
+
+@interface Foo ()
+@property (readwrite) char foo; // expected-error {{property has a previous declaration}}
+@end
OpenPOWER on IntegriCloud