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
6 typedef void (^void_block_t)(void);
8 @interface PropertyClass {
10 void_block_t __completion;
17 @property (copy) void_block_t completionBlock;
18 @property (retain) PropertyClass* Yblock;
19 @property (readonly) PropertyClass* readonlyAttr;
20 @property (readonly,copy) PropertyClass* readonlyCopyAttr;
21 @property (readonly,retain) PropertyClass* readonlyRetainAttr;
22 @property (readonly,retain,nonatomic) PropertyClass* readonlyNonatomicAttr;
23 @property (copy) id ID;
27 @implementation PropertyClass
28 @synthesize q; // attributes should be "Ti,Vq"
29 @dynamic r; // attributes should be "Ti,D"
30 @synthesize completionBlock=__completion; // "T@?,C,V__completion"
31 @synthesize Yblock = YVAR; // "T@\"PropertyClass\",&,VYVAR"
32 @synthesize readonlyAttr;
33 @synthesize readonlyCopyAttr;
34 @synthesize readonlyRetainAttr;
35 @synthesize readonlyNonatomicAttr;
36 @synthesize ID; // "T@,C,VID"
41 // CHECK: T@?,C,V__completion
42 // CHECK: T@\"PropertyClass\",&,VYVAR
43 // CHECK: T@\"PropertyClass\",R,VreadonlyAttr
44 // CHECK: T@\"PropertyClass\",R,C,VreadonlyCopyAttr
45 // CHECK: T@\"PropertyClass\",R,&,VreadonlyRetainAttr
46 // CHECK: T@\"PropertyClass\",R,&,N,VreadonlyNonatomicAttr
49 @interface Test (Category)
53 @implementation Test (Category)
57 // CHECK: {{"q","Ti,D"}}