xref: /llvm-project/clang/test/Parser/objc-property-syntax.m (revision cbe1eba0c6df4a6dd5a19fd4f6ba5e05cce7f101)
1// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2
3@interface MyClass {
4  int prop;
5};
6@property unsigned char bufferedUTF8Bytes[4];  // expected-error {{property cannot have array or function type}}
7@property unsigned char bufferedUTFBytes:1;    // expected-error {{property name cannot be a bit-field}}
8@property(nonatomic, retain, setter=ab_setDefaultToolbarItems) MyClass *ab_defaultToolbarItems; // expected-error {{method name referenced in property setter attribute must end with ':'}}
9
10@property int prop;
11@end
12
13@implementation MyClass
14@dynamic ab_defaultToolbarItems // expected-error{{expected ';' after @dynamic}}
15@synthesize prop // expected-error{{expected ';' after @synthesize}}
16@end
17
18