This is an archive of the discontinued LLVM Phabricator instance.

Add ObjCBoxable handling to ObjCMigrator
AbandonedPublic

Authored by AlexDenisov on Apr 11 2016, 7:57 AM.

Details

Reviewers
akyrtzi
Summary

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());

Diff Detail

Event Timeline

AlexDenisov retitled this revision from to Add ObjCBoxable handling to ObjCMigrator.
AlexDenisov updated this object.
AlexDenisov added a reviewer: akyrtzi.
AlexDenisov abandoned this revision.May 4 2019, 10:51 AM