[cfe-dev] Obj-C false positive warning with deprecation and instancetype?

Ted Kremenek kremenek at apple.com
Wed Jan 11 12:33:37 PST 2012

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120111/ae45aad6/attachment.html>

More information about the cfe-dev mailing list