• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o %t %s
2// rdar://7923851.
3
4// Superclass declares property. Subclass redeclares the same property.
5// Do not @synthesize-by-default in the subclass. P1
6// Superclass declares a property. Subclass declares a different property with the same name
7// (such as different type or attributes). Do not @synthesize-by-default in the subclass. P2
8// Superclass conforms to a protocol that declares a property. Subclass redeclares the
9// same property.  Do not @synthesize-by-default in the subclass. P3
10// Superclass conforms to a protocol that declares a property. Subclass conforms to the
11// same protocol or a derived protocol. Do not @synthesize-by-default in the subclass. P4
12
13
14@protocol PROTO
15  @property int P3;
16  @property int P4;
17@end
18
19@protocol PROTO1 <PROTO>
20  @property int IMP1;
21@end
22
23@interface Super <PROTO>
24  @property int P1;
25  @property (copy) id P2;
26@end
27
28@interface Sub : Super <PROTO1>
29  @property int P1;
30  @property (nonatomic, retain) id P2; // expected-warning {{property 'P2' 'copy' attribute does not match the property inherited from 'Super'}} \
31				       // expected-warning {{property 'P2' 'atomic' attribute does not match the property inherited from 'Super'}}
32  @property int P3;
33  @property int IMP2;
34@end
35
36@implementation Sub
37@end
38
39