Author: fjahanian
Date: Tue Sep 24 16:27:58 2013
New Revision: 191335

URL: http://llvm.org/viewvc/llvm-project?rev=191335&view=rev
Log:
ObjectiveC migrator: provide space between the property 
keyword and the rest on suggested property. // rdar://15069044


Modified:
    cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
    cfe/trunk/test/ARCMT/objcmt-arc-cf-annotations.m.result
    cfe/trunk/test/ARCMT/objcmt-property.m.result

Modified: cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ObjCMT.cpp?rev=191335&r1=191334&r2=191335&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ObjCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ObjCMT.cpp Tue Sep 24 16:27:58 2013
@@ -252,7 +252,7 @@ static bool rewriteToObjCProperty(const
                                   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) {

Modified: cfe/trunk/test/ARCMT/objcmt-arc-cf-annotations.m.result
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/objcmt-arc-cf-annotations.m.result?rev=191335&r1=191334&r2=191335&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/objcmt-arc-cf-annotations.m.result (original)
+++ cfe/trunk/test/ARCMT/objcmt-arc-cf-annotations.m.result Tue Sep 24 16:27:58 
2013
@@ -2088,8 +2088,8 @@ void rdar13783514(xpc_connection_t conne
 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

Modified: cfe/trunk/test/ARCMT/objcmt-property.m.result
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/objcmt-property.m.result?rev=191335&r1=191334&r2=191335&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/objcmt-property.m.result (original)
+++ cfe/trunk/test/ARCMT/objcmt-property.m.result Tue Sep 24 16:27:58 2013
@@ -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


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to