2 // RUN: %clang_cc1 -fblocks -objcmt-migrate-readwrite-property -objcmt-ns-nonatomic-iosonly -objcmt-migrate-readonly-property -objcmt-atomic-property -mt-migrate-directory %t %s -x objective-c -fobjc-runtime-has-weak -fobjc-arc -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 -fblocks -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -fobjc-runtime-has-weak -fobjc-arc %s.result
6 #define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION) ANNOTATION
7 #define WEAK_IMPORT_ATTRIBUTE __attribute__((objc_arc_weak_reference_unavailable))
8 #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER
9 #define DEPRECATED __attribute__((deprecated))
12 #define NS_NONATOMIC_IOSONLY nonatomic
14 #define NS_NONATOMIC_IOSONLY atomic
19 @protocol NSCopying @end
21 @interface NSObject <NSCopying>
24 @interface NSDictionary : NSObject
27 @interface I : NSObject {
30 - (void) setWeakProp : (NSString *__weak)Val;
31 - (NSString *__weak) WeakProp;
33 - (NSString *) StrongProp;
34 - (void) setStrongProp : (NSString *)Val;
36 - (NSString *) UnavailProp __attribute__((unavailable));
37 - (void) setUnavailProp : (NSString *)Val;
39 - (NSString *) UnavailProp1 __attribute__((unavailable));
40 - (void) setUnavailProp1 : (NSString *)Val __attribute__((unavailable));
42 - (NSString *) UnavailProp2;
43 - (void) setUnavailProp2 : (NSString *)Val __attribute__((unavailable));
45 - (NSDictionary*) undoAction;
46 - (void) setUndoAction: (NSDictionary*)Arg;
61 - (void)setNames1:(NSArray *)names;
62 - (void)setNames4:(__strong NSArray *)names;
63 - (void)setNames3:(__strong NSArray *)names;
64 - (void)setNames2:(NSArray *)names;
67 - (__strong NSArray *)names4;
71 // Properties that contain the name "delegate" or "dataSource",
72 // or have exact name "target" have unsafe_unretained attribute.
73 @interface NSInvocation
75 - (void)setTarget:(id)target;
80 - (void)setXxxdelegateYYY:(id)delegate;
82 - (void)setDataSource:(id)source;
85 - (void)setMYtarget: (id)target;
88 - (void)setTargetX: (id)t;
91 - (void)setValue: (int)val;
94 -(void) setContinuous:(BOOL)value;
97 - (void)setAnObject : (id) object;
100 - (void) setInValid : (BOOL) arg;
106 - (void *)JSObject WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER);
107 - (BOOL)isIgnoringInteractionEvents;
109 - (NSString *)getStringValue;
110 - (BOOL)getCounterValue;
111 - (void)setStringValue:(NSString *)stringValue AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER;
112 - (NSDictionary *)getns_dixtionary;
114 - (BOOL)is3bar; // watch out
115 - (NSString *)get3foo; // watch out
125 @interface NSInvocation(CAT)
127 - (void)setTarget:(id)target;
131 - (id)xxxdelegateYYY;
132 - (void)setXxxdelegateYYY:(id)delegate;
134 - (void)setDataSource:(id)source;
137 - (void)setMYtarget: (id)target;
140 - (void)setTargetX: (id)t;
143 - (void)setValue: (int)val;
145 -(BOOL) isContinuous;
146 -(void) setContinuous:(BOOL)value;
149 - (void)setAnObject : (id) object;
152 - (void) setInValid : (BOOL) arg;
159 - (BOOL)is3bar; // watch out
160 - (NSString *)get3foo; // watch out
172 - (void) setInValid : (BOOL) arg;
175 @interface AnotherOne
176 - (BOOL) isinValid DEPRECATED;
177 - (void) setInValid : (BOOL) arg;
179 - (void)setMYtarget: (id)target DEPRECATED;
180 - (BOOL) getM DEPRECATED;
182 - (id)xxxdelegateYYY DEPRECATED;
183 - (void)setXxxdelegateYYY:(id)delegate DEPRECATED;
186 #define NS_AVAILABLE __attribute__((availability(macosx,introduced=10.0)))
187 #define NORETURN __attribute__((noreturn))
188 #define ALIGNED __attribute__((aligned(16)))
191 // Do not infer a property.
192 - (NSURL *)appStoreReceiptURL NS_AVAILABLE;
193 - (void) setAppStoreReceiptURL : (NSURL *)object;
195 - (NSURL *)appStoreReceiptURLX NS_AVAILABLE;
196 - (void) setAppStoreReceiptURLX : (NSURL *)object NS_AVAILABLE;
198 // Do not infer a property.
199 - (NSURL *)appStoreReceiptURLY ;
200 - (void) setAppStoreReceiptURLY : (NSURL *)object NS_AVAILABLE;
202 - (id)OkToInfer NS_AVAILABLE;
204 // Do not infer a property.
205 - (NSURL *)appStoreReceiptURLZ ;
206 - (void) setAppStoreReceiptURLZ : (NSURL *)object NS_AVAILABLE;
208 // Do not infer a property.
209 - (id) t1 NORETURN NS_AVAILABLE;
210 - (void) setT1 : (id) arg NS_AVAILABLE;
212 - (id)method1 ALIGNED NS_AVAILABLE;
213 - (void) setMethod1 : (id) object NS_AVAILABLE ALIGNED;
215 - (NSURL *)init; // No Change
216 + (id)alloc; // No Change
218 - (BOOL)is1stClass; // Not a valid property
219 - (BOOL)isClass; // This is a valid property 'class' is not a keyword in ObjC
220 - (BOOL)isDouble; // Not a valid property
224 @class NSMutableDictionary;
227 - (id (^)(id, NSArray *, NSMutableDictionary *)) expressionBlock;
228 - (id (^)(id, NSArray *, NSMutableDictionary *)) MyBlock;
229 - (void) setMyBlock : (id (^)(id, NSArray *, NSMutableDictionary *)) bl;
230 - (id (*)(id, NSArray *, NSMutableDictionary *)) expressionFuncptr;
231 - (id (*)(id, NSArray *, NSMutableDictionary *)) MyFuncptr;
232 - (void) setMyFuncptr : (id (*)(id, NSArray *, NSMutableDictionary *)) bl;