1 // RUN: %clang_cc1 -E %s -o %t.mm
2 // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s
4 typedef void (^void_block_t)(void);
6 @interface PropertyClass {
8 void_block_t __completion;
15 @property (copy) void_block_t completionBlock;
16 @property (retain) PropertyClass* Yblock;
17 @property (readonly) PropertyClass* readonlyAttr;
18 @property (readonly,copy) PropertyClass* readonlyCopyAttr;
19 @property (readonly,retain) PropertyClass* readonlyRetainAttr;
20 @property (readonly,retain,nonatomic) PropertyClass* readonlyNonatomicAttr;
21 @property (copy) id ID;
25 @implementation PropertyClass
26 @synthesize q; // attributes should be "Ti,Vq"
27 @dynamic r; // attributes should be "Ti,D"
28 @synthesize completionBlock=__completion; // "T@?,C,V__completion"
29 @synthesize Yblock = YVAR; // "T@\"PropertyClass\",&,VYVAR"
30 @synthesize readonlyAttr;
31 @synthesize readonlyCopyAttr;
32 @synthesize readonlyRetainAttr;
33 @synthesize readonlyNonatomicAttr;
34 @synthesize ID; // "T@,C,VID"
39 // CHECK: T@?,C,V__completion
40 // CHECK: T@\"PropertyClass\",&,VYVAR
41 // CHECK: T@\"PropertyClass\",R,VreadonlyAttr
42 // CHECK: T@\"PropertyClass\",R,C,VreadonlyCopyAttr
43 // CHECK: T@\"PropertyClass\",R,&,VreadonlyRetainAttr
44 // CHECK: T@\"PropertyClass\",R,&,N,VreadonlyNonatomicAttr
47 @interface Test (Category)
51 @implementation Test (Category)
55 // CHECK: {{"q","Ti,D"}}