[cfe-dev] warning if method availability is newer than minimum deployment target

John McCall rjmccall at apple.com
Fri Oct 26 11:46:39 PDT 2012


On Oct 26, 2012, at 7:39 AM, Richard wrote:
> i am trying to generate warnings building an xcode project when calling a method that is available later than the current minimum deployment target. is this a job for a clang analyzer plugin, or is there some easier way to achieve this that i am not aware of?

In theory it's really straightforward to do;  there's an availability attribute which should give us this information.  In practice it's quite a bit harder because real code often intentionally uses APIs that aren't available on the minimum deployment target, and that's totally fine *if that code just doesn't run on such targets*.  Detecting that latter condition and suppressing the warning there is quite a bit harder.

John.



More information about the cfe-dev mailing list