xref: /aosp_15_r20/external/clang/test/SemaObjC/property-4.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1 -verify %s
2*67e74705SXin Li
3*67e74705SXin Li@interface Object
4*67e74705SXin Li@end
5*67e74705SXin Li
6*67e74705SXin Li@protocol ProtocolObject
7*67e74705SXin Li@property int class;
8*67e74705SXin Li@property (copy) id MayCauseError;
9*67e74705SXin Li@end
10*67e74705SXin Li
11*67e74705SXin Li@protocol ProtocolDerivedGCObject <ProtocolObject>
12*67e74705SXin Li@property int Dclass;
13*67e74705SXin Li@end
14*67e74705SXin Li
15*67e74705SXin Li@interface GCObject  : Object <ProtocolDerivedGCObject> {
16*67e74705SXin Li    int ifield;
17*67e74705SXin Li    int iOwnClass;
18*67e74705SXin Li    int iDclass;
19*67e74705SXin Li}
20*67e74705SXin Li@property int OwnClass;
21*67e74705SXin Li@end
22*67e74705SXin Li
23*67e74705SXin Li@interface ReleaseObject : GCObject <ProtocolObject> {
24*67e74705SXin Li   int newO;
25*67e74705SXin Li   int oldO;
26*67e74705SXin Li}
27*67e74705SXin Li@property (retain) id MayCauseError;  // expected-warning {{'copy' attribute on property 'MayCauseError' does not match the property inherited from 'ProtocolObject'}}
28*67e74705SXin Li@end
29*67e74705SXin Li
30