xref: /aosp_15_r20/external/clang/test/SemaObjC/property-ownership-attr.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1 -fsyntax-only -verify %s
2*67e74705SXin Li// rdar://15014468
3*67e74705SXin Li
4*67e74705SXin Li@protocol P
5*67e74705SXin Li  @property(readonly) id z;
6*67e74705SXin Li@end
7*67e74705SXin Li
8*67e74705SXin Li@interface Foo
9*67e74705SXin Li  @property (readonly) id x;
10*67e74705SXin Li@end
11*67e74705SXin Li
12*67e74705SXin Li@interface MutableFoo : Foo
13*67e74705SXin Li  @property (copy) id x;
14*67e74705SXin Li@end
15*67e74705SXin Li
16*67e74705SXin Li@interface Foo (Cat) <P>
17*67e74705SXin Li@property (copy) id  z; // expected-warning {{'copy' attribute on property 'z' does not match the property inherited from 'P'}}
18*67e74705SXin Li@end
19*67e74705SXin Li
20