Re: [PATCH] Add ObjCBoxable handling to ObjCMigrator

2016-02-14 Thread Alex Denisov via cfe-commits
Rebased against trunk:



objc_migrator_objc_boxable.patch
Description: Binary data


--
AlexDenisov
Software Engineer, http://lowlevelbits.org

> On 05 Dec 2015, at 22:19, John McCall  wrote:
> 
>> On Dec 5, 2015, at 7:58 AM, AlexDenisov <1101.deb...@gmail.com> wrote:
>> Extend ObjCMigrator to cover automatic migration from message sending to 
>> boxable literals, e.g.:
>> 
>> ```before
>> typedef struct __attribute__((objc_boxable)) CGRect CGRect;
>> /// ...
>> CGRect rect;
>> [NSValue valueWithBytes: objCType:@encode(CGRect)];
>> [NSValue valueWithCGPoint:functionReturningCGPoint()];
>> ```
>> 
>> ```after
>> typedef struct __attribute__((objc_boxable)) CGRect CGRect;
>> /// ...
>> CGRect rect;
>> @(rect);
>> @(functionReturningCGPoint());
>> ```
>> 
>> I will appreciate any ideas how to improve it since the implementation is 
>> far from beautiful.
>> 
>> 
> 
> CC’ing Argyrios, who knows the migration code much better than I do.
> 
> John.



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] Add ObjCBoxable handling to ObjCMigrator

2016-01-06 Thread Alex Denisov via cfe-commits
Any updates? :)
--
AlexDenisov
Software Engineer, http://lowlevelbits.org

> On 05 Dec 2015, at 22:19, John McCall  wrote:
> 
>> On Dec 5, 2015, at 7:58 AM, AlexDenisov <1101.deb...@gmail.com> wrote:
>> Extend ObjCMigrator to cover automatic migration from message sending to 
>> boxable literals, e.g.:
>> 
>> ```before
>> typedef struct __attribute__((objc_boxable)) CGRect CGRect;
>> /// ...
>> CGRect rect;
>> [NSValue valueWithBytes: objCType:@encode(CGRect)];
>> [NSValue valueWithCGPoint:functionReturningCGPoint()];
>> ```
>> 
>> ```after
>> typedef struct __attribute__((objc_boxable)) CGRect CGRect;
>> /// ...
>> CGRect rect;
>> @(rect);
>> @(functionReturningCGPoint());
>> ```
>> 
>> I will appreciate any ideas how to improve it since the implementation is 
>> far from beautiful.
>> 
>> 
> 
> CC’ing Argyrios, who knows the migration code much better than I do.
> 
> John.



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] Add ObjCBoxable handling to ObjCMigrator

2015-12-05 Thread AlexDenisov via cfe-commits
Extend ObjCMigrator to cover automatic migration from message sending to 
boxable literals, e.g.:

```before
typedef struct __attribute__((objc_boxable)) CGRect CGRect;
/// ...
CGRect rect;
[NSValue valueWithBytes: objCType:@encode(CGRect)];
[NSValue valueWithCGPoint:functionReturningCGPoint()];
```

```after
typedef struct __attribute__((objc_boxable)) CGRect CGRect;
/// ...
CGRect rect;
@(rect);
@(functionReturningCGPoint());
```

I will appreciate any ideas how to improve it since the implementation is far 
from beautiful.



objc_migrator_objc_boxable.patch
Description: Binary data

--
AlexDenisov
Software Engineer, http://lowlevelbits.org



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] Add ObjCBoxable handling to ObjCMigrator

2015-12-05 Thread John McCall via cfe-commits
> On Dec 5, 2015, at 7:58 AM, AlexDenisov <1101.deb...@gmail.com> wrote:
> Extend ObjCMigrator to cover automatic migration from message sending to 
> boxable literals, e.g.:
> 
> ```before
> typedef struct __attribute__((objc_boxable)) CGRect CGRect;
> /// ...
> CGRect rect;
> [NSValue valueWithBytes: objCType:@encode(CGRect)];
> [NSValue valueWithCGPoint:functionReturningCGPoint()];
> ```
> 
> ```after
> typedef struct __attribute__((objc_boxable)) CGRect CGRect;
> /// ...
> CGRect rect;
> @(rect);
> @(functionReturningCGPoint());
> ```
> 
> I will appreciate any ideas how to improve it since the implementation is far 
> from beautiful.
> 
> 

CC’ing Argyrios, who knows the migration code much better than I do.

John.
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits