ObjectiveC migrator: provide space between the property

keyword and the rest on suggested property. // rdar://15069044

llvm-svn: 191335
This commit is contained in:
Fariborz Jahanian 2013-09-24 21:27:58 +00:00
parent aaabfcdffe
commit 7797c0d0f7
3 changed files with 49 additions and 49 deletions

View File

@ -252,7 +252,7 @@ static bool rewriteToObjCProperty(const ObjCMethodDecl *Getter,
const NSAPI &NS, edit::Commit &commit,
unsigned LengthOfPrefix) {
ASTContext &Context = NS.getASTContext();
std::string PropertyString = "@property(nonatomic";
std::string PropertyString = "@property (nonatomic";
std::string PropertyNameString = Getter->getNameAsString();
StringRef PropertyName(PropertyNameString);
if (LengthOfPrefix > 0) {

View File

@ -2088,8 +2088,8 @@ void rdar13783514(xpc_connection_t connection) {
CFAttributedStringRef CFAttributedCreate(void *CFObj CF_CONSUMED) CF_RETURNS_RETAINED;
@interface Action
@property(nonatomic) SEL action;
@property (nonatomic) SEL action;
@property(nonatomic, unsafe_unretained) id target;
@property (nonatomic, unsafe_unretained) id target;
@end

View File

@ -22,21 +22,21 @@ typedef char BOOL;
int ivarVal;
}
@property(nonatomic, weak) NSString *WeakProp;
@property (nonatomic, weak) NSString *WeakProp;
@property(nonatomic, retain) NSString *StrongProp;
@property (nonatomic, retain) NSString *StrongProp;
- (NSString *) UnavailProp __attribute__((unavailable));
- (void) setUnavailProp : (NSString *)Val;
@property(nonatomic, retain) NSString *UnavailProp1 __attribute__((unavailable));
@property (nonatomic, retain) NSString *UnavailProp1 __attribute__((unavailable));
- (NSString *) UnavailProp2;
- (void) setUnavailProp2 : (NSString *)Val __attribute__((unavailable));
@property(nonatomic, copy) NSDictionary *undoAction;
@property (nonatomic, copy) NSDictionary *undoAction;
@end
@ -56,108 +56,108 @@ typedef char BOOL;
@property(nonatomic, retain) NSArray *names2;
@property(nonatomic, retain) NSArray *names3;
@property(nonatomic, retain) NSArray *names4;
@property(nonatomic, retain) NSArray *names1;
@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 target;
@property(nonatomic, unsafe_unretained) id dataSource;
@property (nonatomic, unsafe_unretained) id dataSource;
@property(nonatomic, unsafe_unretained) id xxxdelegateYYY;
@property (nonatomic, unsafe_unretained) id xxxdelegateYYY;
@property(nonatomic, retain) id MYtarget;
@property (nonatomic, retain) id MYtarget;
@property(nonatomic, retain) id targetX;
@property (nonatomic, retain) id targetX;
@property(nonatomic) int value;
@property (nonatomic) int value;
@property(nonatomic, getter=isContinuous) BOOL continuous;
@property (nonatomic, getter=isContinuous) BOOL continuous;
- (id) isAnObject;
- (void)setAnObject : (id) object;
@property(nonatomic, getter=isinValid, readonly) BOOL inValid;
@property (nonatomic, getter=isinValid, readonly) BOOL inValid;
- (void) setInValid : (BOOL) arg;
- (void) Nothing;
@property(nonatomic, readonly) int Length;
@property(nonatomic, readonly) id object;
@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, 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=getStringValue, retain) NSString *stringValue;
@property (nonatomic, getter=getCounterValue, readonly) BOOL counterValue;
@property(nonatomic, getter=getns_dixtionary, readonly) NSDictionary *ns_dixtionary;
@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;
@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 target;
@property(nonatomic, unsafe_unretained) id dataSource;
@property (nonatomic, unsafe_unretained) id dataSource;
@property(nonatomic, unsafe_unretained) id xxxdelegateYYY;
@property (nonatomic, unsafe_unretained) id xxxdelegateYYY;
@property(nonatomic, retain) id MYtarget;
@property (nonatomic, retain) id MYtarget;
@property(nonatomic, retain) id targetX;
@property (nonatomic, retain) id targetX;
@property(nonatomic) int value;
@property (nonatomic) int value;
@property(nonatomic, getter=isContinuous) BOOL continuous;
@property (nonatomic, getter=isContinuous) BOOL continuous;
- (id) isAnObject;
- (void)setAnObject : (id) object;
@property(nonatomic, getter=isinValid, readonly) BOOL inValid;
@property (nonatomic, getter=isinValid, readonly) BOOL inValid;
- (void) setInValid : (BOOL) arg;
- (void) Nothing;
@property(nonatomic, readonly) int Length;
@property(nonatomic, readonly) id object;
@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;
@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
DEPRECATED
@ -187,14 +187,14 @@ DEPRECATED
- (NSURL *)appStoreReceiptURL NS_AVAILABLE;
- (void) setAppStoreReceiptURL : (NSURL *)object;
@property(nonatomic, retain) NSURL *appStoreReceiptURLX NS_AVAILABLE;
@property (nonatomic, retain) NSURL *appStoreReceiptURLX NS_AVAILABLE;
// Do not infer a property.
- (NSURL *)appStoreReceiptURLY ;
- (void) setAppStoreReceiptURLY : (NSURL *)object NS_AVAILABLE;
@property(nonatomic, readonly) id OkToInfer NS_AVAILABLE;
@property (nonatomic, readonly) id OkToInfer NS_AVAILABLE;
// Do not infer a property.
- (NSURL *)appStoreReceiptURLZ ;
@ -204,7 +204,7 @@ DEPRECATED
- (id) t1 NORETURN NS_AVAILABLE;
- (void) setT1 : (id) arg NS_AVAILABLE;
@property(nonatomic, retain) id method1 ALIGNED NS_AVAILABLE;
@property (nonatomic, retain) id method1 ALIGNED NS_AVAILABLE;
@end