blob: 7b07cb9aa172368da30c598f70ca4ca464b24e60 [file] [log] [blame]
Fariborz Jahanian3c9707b2012-01-03 19:46:00 +00001// RUN: %clang_cc1 -x objective-c -fsyntax-only -fobjc-default-synthesize-properties -verify %s
2// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -fobjc-default-synthesize-properties -verify %s
3
4__attribute ((objc_suppress_autosynthesis))
5@interface NoAuto
6@property int NoAutoProp; // expected-note 2 {{property declared here}}
7@end
8
9@implementation NoAuto // expected-warning {{property 'NoAutoProp' requires method 'NoAutoProp' to be defined}} \
10 // expected-warning {{property 'NoAutoProp' requires method 'setNoAutoProp:'}}
11@end
12
13__attribute ((objc_suppress_autosynthesis)) // redundant, just for testing
14@interface Sub : NoAuto
15@property (copy) id SubProperty; // expected-note 2 {{property declared here}}
16@end
17
18@implementation Sub // expected-warning {{property 'SubProperty' requires method 'SubProperty' to be defined}} \
19 // expected-warning {{property 'SubProperty' requires method 'setSubProperty:' to be defined}}
20@end
21
22@interface Deep : Sub
23@property (copy) id DeepProperty;
24@property (copy) id DeepSynthProperty;
25@property (copy) id DeepMustSynthProperty; // expected-note {{property declared here}}
26@end
27
28@implementation Deep // expected-warning {{property 'DeepMustSynthProperty' requires method 'setDeepMustSynthProperty:' to be defined}}
29@dynamic DeepProperty;
30@synthesize DeepSynthProperty;
31- (id) DeepMustSynthProperty { return 0; }
32@end
33