r185873 - [Objective-C migrator] replace candidate user setter/getter with

Douglas Gregor dgregor at apple.com
Wed Jul 10 11:10:53 PDT 2013

On Jul 10, 2013, at 8:55 AM, jahanian <fjahanian at apple.com> wrote:

> On Jul 9, 2013, at 5:33 PM, Jordan Rose <jordan_rose at apple.com> wrote:
>> On Jul 9, 2013, at 17:24 , jahanian <fjahanian at apple.com> wrote:
>>>>> + at property(weak) NSString *__weak WeakProp;
>>>>> +
>>>>> + at property(strong) NSString * StrongProp;
>>>> Conventionally, I'd expect the __weak to disappear and the "strong" to be implied instead of explicitly spelled out.
>>> __weak came from user code. migration did not generate it. removed “strong” from migrated attributes.
>> I see that it came from user code; it should go away during the migration.
>> Actually, most "weak" properties will not look like this. A weak implicit property will have a normal signature for the getter and setter, but the backing ivar will be __weak.
>> You really can't migrate properties without looking at the setter implementation. In that sense it's pushing more info into the interface, not less.
> That is so true. Yet, migrator’s workflow allows for user to select/edit/discard the property as needed. 
> Migrator has only knowledge of the declarations it sees. In almost all cases, implementations are not 
> available.

It’s not unreasonable to expect that the implementation be available, because the person @property’ifying their code is likely the person responsible for the implementation in the first place. I think it’s definitely an interesting question whether we’ll need to use knowledge of the implementation for this kind of potentially-semantics-changing migration.

	- Doug

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130710/408374c8/attachment.html>

More information about the cfe-commits mailing list