summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/property-ownership-attr.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/property-ownership-attr.m')
-rw-r--r--test/SemaObjC/property-ownership-attr.m19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaObjC/property-ownership-attr.m b/test/SemaObjC/property-ownership-attr.m
new file mode 100644
index 0000000..f83c560
--- /dev/null
+++ b/test/SemaObjC/property-ownership-attr.m
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// rdar://15014468
+
+@protocol P
+ @property(readonly) id z;
+@end
+
+@interface Foo
+ @property (readonly) id x;
+@end
+
+@interface MutableFoo : Foo
+ @property (copy) id x;
+@end
+
+@interface Foo (Cat) <P>
+@property (copy) id z; // expected-warning {{'copy' attribute on property 'z' does not match the property inherited from 'P'}}
+@end
+
OpenPOWER on IntegriCloud