[cfe-dev] Obj-C false positive warning with deprecation and instancetype?
fjahanian at apple.com
Wed Jan 11 13:28:23 PST 2012
On Jan 11, 2012, at 12:33 PM, Ted Kremenek wrote:
> On Jan 11, 2012, at 12:02 PM, jahanian wrote:
>> Can you point to the document? This can't be part of the 'clang' doc. 'alloc' need to use instancetype for type deduction purposes. Legacy
>> frameworks use 'id' for 'alloc' type.
> clang's instancetype features overrides what is declared in the framework headers. So even if +alloc was declared to return id, it is implicitly changed to return the instancetype instead.
Correct. Forgot about naming convention for +alloc and others implying instancetype type return.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev