brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · ea4875d Raw
56 lines · plain
1// RUN: %clang_cc1 -E %s -o %t.mm2// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s3 4typedef void (^void_block_t)(void);5 6@interface PropertyClass {7    int q;8    void_block_t __completion;9    PropertyClass* YVAR;10    id ID;11}12@property int q;13@property int r;14 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;22 23@end24 25@implementation PropertyClass26@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@end36 37// CHECK: Ti,Vq38// CHECK: Ti,D39// CHECK: T@?,C,V__completion40// CHECK: T@\"PropertyClass\",&,VYVAR41// CHECK: T@\"PropertyClass\",R,VreadonlyAttr42// CHECK: T@\"PropertyClass\",R,C,VreadonlyCopyAttr43// CHECK: T@\"PropertyClass\",R,&,VreadonlyRetainAttr44// CHECK: T@\"PropertyClass\",R,&,N,VreadonlyNonatomicAttr45 46@interface Test @end47@interface Test (Category)48@property int q;49@end50 51@implementation Test (Category)52@dynamic q;53@end54 55// CHECK: {{"q","Ti,D"}}56