Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Rewriter / objc-modern-property-attributes.mm
blobea4875d6a6ad30b093daca87b19fd71786c0dae8
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 {
7     int q;
8     void_block_t __completion;
9     PropertyClass* YVAR;
10     id ID;
12 @property int q;
13 @property int r;
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;
23 @end
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"
35 @end
37 // CHECK: Ti,Vq
38 // CHECK: Ti,D
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
46 @interface Test @end
47 @interface Test (Category)
48 @property int q;
49 @end
51 @implementation Test (Category)
52 @dynamic q;
53 @end
55 // CHECK: {{"q","Ti,D"}}