diff options
Diffstat (limited to 'clang/test/Parser/objc-property-syntax.m')
-rw-r--r-- | clang/test/Parser/objc-property-syntax.m | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Parser/objc-property-syntax.m b/clang/test/Parser/objc-property-syntax.m new file mode 100644 index 0000000..38d12d5 --- /dev/null +++ b/clang/test/Parser/objc-property-syntax.m @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s + +@interface MyClass { + int prop; +}; +@property unsigned char bufferedUTF8Bytes[4]; // expected-error {{property cannot have array or function type}} +@property unsigned char bufferedUTFBytes:1; // expected-error {{property name cannot be a bitfield}} +@property(nonatomic, retain, setter=ab_setDefaultToolbarItems) MyClass *ab_defaultToolbarItems; // expected-error {{method name referenced in property setter attribute must end with ':'}} + +@property int prop; +@end + +@implementation MyClass +@dynamic ab_defaultToolbarItems // expected-error{{expected ';' after @dynamic}} +@synthesize prop // expected-error{{expected ';' after @synthesize}} +@end + |