Clang needs to be able to report un-protected "new" APIs

Originator:glenn
Number:rdar://15385838 Date Originated:2013-11-04
Status:Open Resolved:
Product:Xcode Product Version:5.0.1
Classification: Reproducible:Always
 
Summary:
Using the Xcode "Analyze" menu option, we should be able to see APIs called from our code that aren't somehow protected against being called on older OSes, e.g. calling a handler that was introduced in a newer API where we aren't checking for the existence of that handler in an older OS.

For example, calling -[MPVolumeView setRouteButtonImage:forState:] on iOS 5.1 without first checking whether the MPVolumeView responds to the selector.

Steps to Reproduce:


Expected Results:
Analyzer warning something like, "Calling new API 'setRouteButtonImage:forState:' without first checking for support on pre-iOS 6 devices"

Actual Results:


Version:
ProductName:	Mac OS X
ProductVersion:	10.9
BuildVersion:	13A603
Xcode 5.0.1
Build version 5A2053

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!