1 // RUN: rm -rf %t 2 // RUN: %clang_cc1 -objcmt-migrate-property -mt-migrate-directory %t %s -x objective-c -fobjc-runtime-has-weak -fobjc-arc -fobjc-default-synthesize-properties -triple x86_64-apple-darwin11 3 // RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result 4 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -fobjc-runtime-has-weak -fobjc-arc -fobjc-default-synthesize-properties %s.result 5 6 @class NSString; 7 @protocol NSCopying @end 8 9 @interface NSObject <NSCopying> 10 @end 11 12 @interface NSDictionary : NSObject 13 @end 14 15 @interface I : NSObject { 16 int ivarVal; 17 } 18 19 @property(weak) NSString * WeakProp; 20 21 @property(retain) NSString * StrongProp; 22 23 24 - (NSString *) UnavailProp __attribute__((unavailable)); 25 - (void) setUnavailProp : (NSString *)Val; 26 27 - (NSString *) UnavailProp1 __attribute__((unavailable)); 28 - (void) setUnavailProp1 : (NSString *)Val __attribute__((unavailable)); 29 30 - (NSString *) UnavailProp2; 31 - (void) setUnavailProp2 : (NSString *)Val __attribute__((unavailable)); 32 33 @property(copy) NSDictionary * undoAction; 34 35 @end 36 37 @implementation I 38 @end 39 40 @class NSArray; 41 42 @interface MyClass2 { 43 @private 44 NSArray *_names1; 45 NSArray *_names2; 46 NSArray *_names3; 47 NSArray *_names4; 48 } 49 50 51 52 53 @property(retain) NSArray * names2; 54 @property(retain) NSArray * names3; 55 @property(retain) NSArray * names4; 56 @property(retain) NSArray * names1; 57 @end 58 59 // Properties that contain the name "delegate" or "dataSource", 60 // or have exact name "target" have unsafe_unretained attribute. 61 @interface NSInvocation 62 @property(unsafe_unretained) id target; 63 64 65 @property(unsafe_unretained) id dataSource; 66 67 @property(unsafe_unretained) id xxxdelegateYYY; 68 69 70 71 72 @property(retain) id MYtarget; 73 74 75 @property(retain) id targetX; 76 77 78 @property int value; 79 80 @end 81