[PATCH] Add ObjCBoxable handling to ObjCMigrator

Alex Denisov via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 6 22:17:27 PST 2016


Any updates? :)
--
AlexDenisov
Software Engineer, http://lowlevelbits.org

> On 05 Dec 2015, at 22:19, John McCall <rjmccall at apple.com> wrote:
> 
>> On Dec 5, 2015, at 7:58 AM, AlexDenisov <1101.debian at 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:&rect 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>
> 
> CC’ing Argyrios, who knows the migration code much better than I do.
> 
> John.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160107/cd3f09d6/attachment.sig>


More information about the cfe-commits mailing list