| Fariborz Jahanian | ee1db7a | 2012-03-22 17:39:35 +0000 | [diff] [blame] | 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 |
| 3 | |
| 4 | // rdar://11095151 |
| 5 | |
| 6 | typedef void (^void_block_t)(void); |
| 7 | |
| 8 | @interface PropertyClass { |
| 9 | int q; |
| 10 | void_block_t __completion; |
| 11 | PropertyClass* YVAR; |
| 12 | id ID; |
| 13 | } |
| 14 | @property int q; |
| 15 | @property int r; |
| 16 | |
| 17 | @property (copy) void_block_t completionBlock; |
| 18 | @property (retain) PropertyClass* Yblock; |
| Nico Weber | 4e8626f | 2013-05-08 23:47:40 +0000 | [diff] [blame] | 19 | @property (readonly) PropertyClass* readonlyAttr; |
| 20 | @property (readonly,copy) PropertyClass* readonlyCopyAttr; |
| 21 | @property (readonly,retain) PropertyClass* readonlyRetainAttr; |
| 22 | @property (readonly,retain,nonatomic) PropertyClass* readonlyNonatomicAttr; |
| Fariborz Jahanian | ee1db7a | 2012-03-22 17:39:35 +0000 | [diff] [blame] | 23 | @property (copy) id ID; |
| 24 | |
| 25 | @end |
| 26 | |
| 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" |
| Nico Weber | 4e8626f | 2013-05-08 23:47:40 +0000 | [diff] [blame] | 32 | @synthesize readonlyAttr; |
| 33 | @synthesize readonlyCopyAttr; |
| 34 | @synthesize readonlyRetainAttr; |
| 35 | @synthesize readonlyNonatomicAttr; |
| Fariborz Jahanian | ee1db7a | 2012-03-22 17:39:35 +0000 | [diff] [blame] | 36 | @synthesize ID; // "T@,C,VID" |
| 37 | @end |
| 38 | |
| 39 | // CHECK: Ti,Vq |
| 40 | // CHECK: Ti,D |
| 41 | // CHECK: T@?,C,V__completion |
| 42 | // CHECK: T@\"PropertyClass\",&,VYVAR |
| Nico Weber | 4e8626f | 2013-05-08 23:47:40 +0000 | [diff] [blame] | 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 |
| Fariborz Jahanian | ee1db7a | 2012-03-22 17:39:35 +0000 | [diff] [blame] | 47 | |
| Fariborz Jahanian | e9863b5 | 2012-05-03 23:19:33 +0000 | [diff] [blame] | 48 | @interface Test @end |
| 49 | @interface Test (Category) |
| 50 | @property int q; |
| 51 | @end |
| 52 | |
| 53 | @implementation Test (Category) |
| 54 | @dynamic q; |
| 55 | @end |
| 56 | |
| 57 | // CHECK: {{"q","Ti,D"}} |