llvm-project/clang/test/ARCMT/objcmt-property.m.result

161 lines
4.3 KiB
Plaintext
Raw Normal View History

// RUN: rm -rf %t
// RUN: %clang_cc1 -objcmt-migrate-property -objcmt-migrate-readonly-property -mt-migrate-directory %t %s -x objective-c -fobjc-runtime-has-weak -fobjc-arc -fobjc-default-synthesize-properties -triple x86_64-apple-darwin11
// 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
#define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION) ANNOTATION
#define WEAK_IMPORT_ATTRIBUTE __attribute__((objc_arc_weak_reference_unavailable))
#define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER
typedef char BOOL;
@class NSString;
@protocol NSCopying @end
@interface NSObject <NSCopying>
@end
@interface NSDictionary : NSObject
@end
@interface I : NSObject {
int ivarVal;
}
@property(nonatomic, weak) NSString * WeakProp;
@property(nonatomic, retain) NSString * StrongProp;
- (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));
@property(nonatomic, copy) NSDictionary * undoAction;
@end
@implementation I
@end
@class NSArray;
@interface MyClass2 {
@private
NSArray *_names1;
NSArray *_names2;
NSArray *_names3;
NSArray *_names4;
}
@property(nonatomic, retain) NSArray * names2;
@property(nonatomic, retain) NSArray * names3;
@property(nonatomic, retain) NSArray * names4;
@property(nonatomic, retain) NSArray * names1;
@end
// Properties that contain the name "delegate" or "dataSource",
// or have exact name "target" have unsafe_unretained attribute.
@interface NSInvocation
@property(nonatomic, unsafe_unretained) id target;
@property(nonatomic, unsafe_unretained) id dataSource;
@property(nonatomic, unsafe_unretained) id xxxdelegateYYY;
@property(nonatomic, retain) id MYtarget;
@property(nonatomic, retain) id targetX;
@property(nonatomic) int value;
@property(nonatomic, getter=isContinuous) BOOL continuous;
@property(nonatomic, readonly) id isAnObject;
- (void)setAnObject : (id) object;
@property(nonatomic, getter=isinValid, readonly) BOOL inValid;
- (void) setInValid : (BOOL) arg;
- (void) Nothing;
@property(nonatomic, readonly) int Length;
@property(nonatomic, readonly) id object;
+ (double) D;
@property(nonatomic, readonly) void * JSObject WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER);
@property(nonatomic, getter=isIgnoringInteractionEvents, readonly) BOOL ignoringInteractionEvents;
@property(nonatomic, getter=getStringValue, retain) NSString * stringValue;
@property(nonatomic, getter=getCounterValue, readonly) BOOL counterValue;
@property(nonatomic, getter=getns_dixtionary, readonly) NSDictionary * ns_dixtionary;
- (BOOL)is3bar; // watch out
- (NSString *)get3foo; // watch out
@property(nonatomic, getter=getM, readonly) BOOL m;
@property(nonatomic, getter=getMA, readonly) BOOL MA;
@property(nonatomic, getter=getALL, readonly) BOOL ALL;
@property(nonatomic, getter=getMANY, readonly) BOOL MANY;
@property(nonatomic, getter=getSome, readonly) BOOL some;
@end
@interface NSInvocation(CAT)
@property(nonatomic, unsafe_unretained) id target;
@property(nonatomic, unsafe_unretained) id dataSource;
@property(nonatomic, unsafe_unretained) id xxxdelegateYYY;
@property(nonatomic, retain) id MYtarget;
@property(nonatomic, retain) id targetX;
@property(nonatomic) int value;
@property(nonatomic, getter=isContinuous) BOOL continuous;
@property(nonatomic, readonly) id isAnObject;
- (void)setAnObject : (id) object;
@property(nonatomic, getter=isinValid, readonly) BOOL inValid;
- (void) setInValid : (BOOL) arg;
- (void) Nothing;
@property(nonatomic, readonly) int Length;
@property(nonatomic, readonly) id object;
+ (double) D;
- (BOOL)is3bar; // watch out
- (NSString *)get3foo; // watch out
@property(nonatomic, getter=getM, readonly) BOOL m;
@property(nonatomic, getter=getMA, readonly) BOOL MA;
@property(nonatomic, getter=getALL, readonly) BOOL ALL;
@property(nonatomic, getter=getMANY, readonly) BOOL MANY;
@property(nonatomic, getter=getSome, readonly) BOOL some;
@end