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