2013-07-09 05:42:08 +08:00
|
|
|
// RUN: rm -rf %t
|
2013-07-10 00:59:14 +08:00
|
|
|
// 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
|
2013-07-09 05:42:08 +08:00
|
|
|
// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
|
|
|
|
// 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
|
|
|
|
|
2013-08-09 04:51:58 +08:00
|
|
|
typedef char BOOL;
|
2013-07-09 05:42:08 +08:00
|
|
|
@class NSString;
|
2013-07-11 05:30:22 +08:00
|
|
|
@protocol NSCopying @end
|
|
|
|
|
|
|
|
@interface NSObject <NSCopying>
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSDictionary : NSObject
|
|
|
|
@end
|
2013-07-09 05:42:08 +08:00
|
|
|
|
|
|
|
@interface I : NSObject {
|
|
|
|
int ivarVal;
|
|
|
|
}
|
|
|
|
|
2013-07-11 05:30:22 +08:00
|
|
|
@property(weak) NSString * WeakProp;
|
2013-07-09 05:42:08 +08:00
|
|
|
|
2013-08-07 02:06:23 +08:00
|
|
|
@property(retain) NSString * StrongProp;
|
2013-07-09 05:42:08 +08:00
|
|
|
|
2013-07-09 06:49:25 +08:00
|
|
|
|
|
|
|
- (NSString *) UnavailProp __attribute__((unavailable));
|
|
|
|
- (void) setUnavailProp : (NSString *)Val;
|
|
|
|
|
|
|
|
- (NSString *) UnavailProp1 __attribute__((unavailable));
|
|
|
|
- (void) setUnavailProp1 : (NSString *)Val __attribute__((unavailable));
|
|
|
|
|
|
|
|
- (NSString *) UnavailProp2;
|
|
|
|
- (void) setUnavailProp2 : (NSString *)Val __attribute__((unavailable));
|
|
|
|
|
2013-07-11 05:30:22 +08:00
|
|
|
@property(copy) NSDictionary * undoAction;
|
|
|
|
|
2013-07-09 05:42:08 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I
|
|
|
|
@end
|
2013-07-09 07:29:51 +08:00
|
|
|
|
|
|
|
@class NSArray;
|
|
|
|
|
|
|
|
@interface MyClass2 {
|
|
|
|
@private
|
|
|
|
NSArray *_names1;
|
|
|
|
NSArray *_names2;
|
|
|
|
NSArray *_names3;
|
|
|
|
NSArray *_names4;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-07 02:06:23 +08:00
|
|
|
@property(retain) NSArray * names2;
|
|
|
|
@property(retain) NSArray * names3;
|
|
|
|
@property(retain) NSArray * names4;
|
|
|
|
@property(retain) NSArray * names1;
|
|
|
|
@end
|
|
|
|
|
|
|
|
// Properties that contain the name "delegate" or "dataSource",
|
|
|
|
// or have exact name "target" have unsafe_unretained attribute.
|
|
|
|
@interface NSInvocation
|
|
|
|
@property(unsafe_unretained) id target;
|
|
|
|
|
|
|
|
|
|
|
|
@property(unsafe_unretained) id dataSource;
|
|
|
|
|
|
|
|
@property(unsafe_unretained) id xxxdelegateYYY;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@property(retain) id MYtarget;
|
|
|
|
|
|
|
|
|
|
|
|
@property(retain) id targetX;
|
|
|
|
|
|
|
|
|
|
|
|
@property int value;
|
|
|
|
|
2013-08-09 04:51:58 +08:00
|
|
|
|
|
|
|
@property(getter=isContinuous) BOOL continuous;
|
|
|
|
|
|
|
|
|
|
|
|
@property(getter=isAnObject, retain) id anObject;
|
|
|
|
|
|
|
|
|
|
|
|
@property(getter=isxdelegateYYY, unsafe_unretained) id xdelegateYYY;
|
|
|
|
|
2013-07-09 07:29:51 +08:00
|
|
|
@end
|