On Aug 8, 2012, at 9:16 AM, Douglas Gregor wrote:

> 
> On Aug 7, 2012, at 4:48 PM, Fariborz Jahanian <[email protected]> wrote:
> 
>> Author: fjahanian
>> Date: Tue Aug  7 18:48:10 2012
>> New Revision: 161458
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=161458&view=rev
>> Log:
>> objc-arc: Make -Wdirect-ivar-access accessible to all
>> memory models, except when arc is accessing a weak
>> ivar (which is an error). // rdar://6505197
> 
> Thanks! One last question…
> MF_dealloc && 
> 
> In both cases, why do we restrict this warning to ivars of Objective-C 
> pointer type? Direct ivar access to an 'int' ivar is still direct access to 
> an ivar, when one should presumably go through a property or method.
This is also legacy of GCC. I think the rational (at the time) was that it is 
generally safe to use direct ivar access in all cases except for objective-c 
pointers (which will have API
issues related to attributes of their controlling property). Now that we are 
moving further away from GCC, I will relax this too.

- Fariborz

> 
>       - Doug
> 


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

Reply via email to