2 // RUN: %clang_cc1 -fblocks -objcmt-migrate-readwrite-property -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))
13 @protocol NSCopying @end
15 @interface NSObject <NSCopying>
18 @interface NSDictionary : NSObject
21 @interface I : NSObject {
24 - (void) setWeakProp : (NSString *__weak)Val;
25 - (NSString *__weak) WeakProp;
27 - (NSString *) StrongProp;
28 - (void) setStrongProp : (NSString *)Val;
30 - (NSString *) UnavailProp __attribute__((unavailable));
31 - (void) setUnavailProp : (NSString *)Val;
33 - (NSString *) UnavailProp1 __attribute__((unavailable));
34 - (void) setUnavailProp1 : (NSString *)Val __attribute__((unavailable));
36 - (NSString *) UnavailProp2;
37 - (void) setUnavailProp2 : (NSString *)Val __attribute__((unavailable));
39 - (NSDictionary*) undoAction;
40 - (void) setUndoAction: (NSDictionary*)Arg;
55 - (void)setNames1:(NSArray *)names;
56 - (void)setNames4:(__strong NSArray *)names;
57 - (void)setNames3:(__strong NSArray *)names;
58 - (void)setNames2:(NSArray *)names;
61 - (__strong NSArray *)names4;
65 // Properties that contain the name "delegate" or "dataSource",
66 // or have exact name "target" have unsafe_unretained attribute.
67 @interface NSInvocation
69 - (void)setTarget:(id)target;
74 - (void)setXxxdelegateYYY:(id)delegate;
76 - (void)setDataSource:(id)source;
79 - (void)setMYtarget: (id)target;
82 - (void)setTargetX: (id)t;
85 - (void)setValue: (int)val;
88 -(void) setContinuous:(BOOL)value;
91 - (void)setAnObject : (id) object;
94 - (void) setInValid : (BOOL) arg;
100 - (void *)JSObject WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER);
101 - (BOOL)isIgnoringInteractionEvents;
103 - (NSString *)getStringValue;
104 - (BOOL)getCounterValue;
105 - (void)setStringValue:(NSString *)stringValue AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER;
106 - (NSDictionary *)getns_dixtionary;
108 - (BOOL)is3bar; // watch out
109 - (NSString *)get3foo; // watch out
119 @interface NSInvocation(CAT)
121 - (void)setTarget:(id)target;
125 - (id)xxxdelegateYYY;
126 - (void)setXxxdelegateYYY:(id)delegate;
128 - (void)setDataSource:(id)source;
131 - (void)setMYtarget: (id)target;
134 - (void)setTargetX: (id)t;
137 - (void)setValue: (int)val;
139 -(BOOL) isContinuous;
140 -(void) setContinuous:(BOOL)value;
143 - (void)setAnObject : (id) object;
146 - (void) setInValid : (BOOL) arg;
153 - (BOOL)is3bar; // watch out
154 - (NSString *)get3foo; // watch out
166 - (void) setInValid : (BOOL) arg;
169 @interface AnotherOne
170 - (BOOL) isinValid DEPRECATED;
171 - (void) setInValid : (BOOL) arg;
173 - (void)setMYtarget: (id)target DEPRECATED;
174 - (BOOL) getM DEPRECATED;
176 - (id)xxxdelegateYYY DEPRECATED;
177 - (void)setXxxdelegateYYY:(id)delegate DEPRECATED;
180 #define NS_AVAILABLE __attribute__((availability(macosx,introduced=10.0)))
181 #define NORETURN __attribute__((noreturn))
182 #define ALIGNED __attribute__((aligned(16)))
185 // Do not infer a property.
186 - (NSURL *)appStoreReceiptURL NS_AVAILABLE;
187 - (void) setAppStoreReceiptURL : (NSURL *)object;
189 - (NSURL *)appStoreReceiptURLX NS_AVAILABLE;
190 - (void) setAppStoreReceiptURLX : (NSURL *)object NS_AVAILABLE;
192 // Do not infer a property.
193 - (NSURL *)appStoreReceiptURLY ;
194 - (void) setAppStoreReceiptURLY : (NSURL *)object NS_AVAILABLE;
196 - (id)OkToInfer NS_AVAILABLE;
198 // Do not infer a property.
199 - (NSURL *)appStoreReceiptURLZ ;
200 - (void) setAppStoreReceiptURLZ : (NSURL *)object NS_AVAILABLE;
202 // Do not infer a property.
203 - (id) t1 NORETURN NS_AVAILABLE;
204 - (void) setT1 : (id) arg NS_AVAILABLE;
206 - (id)method1 ALIGNED NS_AVAILABLE;
207 - (void) setMethod1 : (id) object NS_AVAILABLE ALIGNED;
209 - (NSURL *)init; // No Change
210 + (id)alloc; // No Change
212 - (BOOL)is1stClass; // Not a valid property
213 - (BOOL)isClass; // This is a valid property 'class' is not a keyword in ObjC
214 - (BOOL)isDouble; // Not a valid property
218 @class NSMutableDictionary;
221 - (id (^)(id, NSArray *, NSMutableDictionary *)) expressionBlock;
222 - (id (^)(id, NSArray *, NSMutableDictionary *)) MyBlock;
223 - (void) setMyBlock : (id (^)(id, NSArray *, NSMutableDictionary *)) bl;
224 - (id (*)(id, NSArray *, NSMutableDictionary *)) expressionFuncptr;
225 - (id (*)(id, NSArray *, NSMutableDictionary *)) MyFuncptr;
226 - (void) setMyFuncptr : (id (*)(id, NSArray *, NSMutableDictionary *)) bl;