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 @property (weak) NSString *WeakProp;
26 @property (strong) NSString *StrongProp;
28 @property (strong) NSString *UnavailProp __attribute__((unavailable));
29 - (void) setUnavailProp : (NSString *)Val;
31 @property (strong) NSString *UnavailProp1 __attribute__((unavailable));
33 @property (strong) NSString *UnavailProp2;
34 - (void) setUnavailProp2 : (NSString *)Val __attribute__((unavailable));
36 @property (copy) NSDictionary *undoAction;
51 @property (strong) NSArray *names2;
52 @property (strong) NSArray *names3;
53 @property (strong) NSArray *names4;
54 @property (strong) NSArray *names1;
57 // Properties that contain the name "delegate" or "dataSource",
58 // or have exact name "target" have unsafe_unretained attribute.
59 @interface NSInvocation
60 @property (assign) id target;
62 @property (assign) id dataSource;
64 @property (assign) id xxxdelegateYYY;
67 @property (strong) id MYtarget;
69 @property (strong) id targetX;
73 @property (getter=isContinuous) BOOL continuous;
76 - (void)setAnObject : (id) object;
78 @property (getter=isinValid, readonly) BOOL inValid;
79 - (void) setInValid : (BOOL) arg;
82 @property (readonly) int Length;
83 @property (readonly, strong) id object;
85 @property (readonly) void *JSObject WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER);
86 @property (getter=isIgnoringInteractionEvents, readonly) BOOL ignoringInteractionEvents;
88 @property (getter=getStringValue, strong) NSString *stringValue;
89 @property (getter=getCounterValue, readonly) BOOL counterValue;
90 @property (getter=getns_dixtionary, readonly, copy) NSDictionary *ns_dixtionary;
92 - (BOOL)is3bar; // watch out
93 - (NSString *)get3foo; // watch out
95 @property (getter=getM, readonly) BOOL m;
96 @property (getter=getMA, readonly) BOOL MA;
97 @property (getter=getALL, readonly) BOOL ALL;
98 @property (getter=getMANY, readonly) BOOL MANY;
99 @property (getter=getSome, readonly) BOOL some;
103 @interface NSInvocation(CAT)
104 @property (assign) id target;
106 @property (assign) id dataSource;
108 @property (assign) id xxxdelegateYYY;
111 @property (strong) id MYtarget;
113 @property (strong) id targetX;
117 @property (getter=isContinuous) BOOL continuous;
120 - (void)setAnObject : (id) object;
122 @property (getter=isinValid, readonly) BOOL inValid;
123 - (void) setInValid : (BOOL) arg;
126 @property (readonly) int Length;
127 @property (readonly, strong) id object;
130 - (BOOL)is3bar; // watch out
131 - (NSString *)get3foo; // watch out
133 @property (getter=getM, readonly) BOOL m;
134 @property (getter=getMA, readonly) BOOL MA;
135 @property (getter=getALL, readonly) BOOL ALL;
136 @property (getter=getMANY, readonly) BOOL MANY;
137 @property (getter=getSome, readonly) BOOL some;
143 - (void) setInValid : (BOOL) arg;
146 @interface AnotherOne
147 - (BOOL) isinValid DEPRECATED;
148 - (void) setInValid : (BOOL) arg;
150 - (void)setMYtarget: (id)target DEPRECATED;
151 - (BOOL) getM DEPRECATED;
153 - (id)xxxdelegateYYY DEPRECATED;
154 - (void)setXxxdelegateYYY:(id)delegate DEPRECATED;
157 #define NS_AVAILABLE __attribute__((availability(macosx,introduced=10.0)))
158 #define NORETURN __attribute__((noreturn))
159 #define ALIGNED __attribute__((aligned(16)))
162 // Do not infer a property.
163 @property (strong) NSURL *appStoreReceiptURL NS_AVAILABLE;
164 - (void) setAppStoreReceiptURL : (NSURL *)object;
166 @property (strong) NSURL *appStoreReceiptURLX NS_AVAILABLE;
168 // Do not infer a property.
169 @property (strong) NSURL *appStoreReceiptURLY ;
170 - (void) setAppStoreReceiptURLY : (NSURL *)object NS_AVAILABLE;
172 @property (readonly, strong) id OkToInfer NS_AVAILABLE;
174 // Do not infer a property.
175 @property (strong) NSURL *appStoreReceiptURLZ ;
176 - (void) setAppStoreReceiptURLZ : (NSURL *)object NS_AVAILABLE;
178 // Do not infer a property.
179 - (id) t1 NORETURN NS_AVAILABLE;
180 - (void) setT1 : (id) arg NS_AVAILABLE;
182 @property (strong) id method1 ALIGNED NS_AVAILABLE;
184 - (NSURL *)init; // No Change
185 + (id)alloc; // No Change
187 - (BOOL)is1stClass; // Not a valid property
188 @property (getter=isClass, readonly) BOOL class; // This is a valid property 'class' is not a keyword in ObjC
189 - (BOOL)isDouble; // Not a valid property
193 @class NSMutableDictionary;
196 @property (readonly, copy) id (^expressionBlock)(id, NSArray *, NSMutableDictionary *);
197 @property (copy) id (^MyBlock)(id, NSArray *, NSMutableDictionary *);
198 @property (readonly) id (*expressionFuncptr)(id, NSArray *, NSMutableDictionary *);
199 @property id (*MyFuncptr)(id, NSArray *, NSMutableDictionary *);