[cfe-dev] Obj-C false positive warning with deprecation and instancetype?
kremenek at apple.com
Wed Jan 11 12:35:13 PST 2012
As Fariborz suggested, please file a bug so we can dig deeper. For us the preferred place is bugreporter.apple.com, but an LLVM Bugzilla report is fine too. We'll likely need preprocessed source or a reduced test case.
On Jan 11, 2012, at 12:24 PM, Sean McBride wrote:
> On Wed, 11 Jan 2012 12:02:32 -0800, jahanian said:
>>>> If alloc is using instancetype then you shouldn't see this warning.
>> Please file a bug report with the pre-processed file.
>>> According to clang doc, "+alloc implicitly has a related result type".
>> So clang should be able to determine what the return type is.
>> 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.
> It's here:
> "The related result type can also be inferred for some methods. To determine whether a method has an inferred related result type, the first word in the camel-case selector (e.g., "init" in "initWithObjects") is considered....."
> This doc is exactly what's lead me to believe this is a false positive.
> Sean McBride, B. Eng sean at rogue-research.com
> Rogue Research www.rogue-research.com
> Mac Software Developer Montréal, Québec, Canada
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
More information about the cfe-dev