As of r277058, Clang would incorrectly emit -Wpartial-availability for the following (when compiled with -mmacosx-verison-min=10.6):
int fn_10_5() __attribute__((availablity(macos, introduced=10.5))); int use() __attribute__((availability(macos, introduced=10.4))) { return fn_10_5(); // incorrect warning: fn_10_5 is partial }
The problem is that I didn't consider the base deployment target when getting the context version, so the availability of the context of the call to fn_10_5 was 10.4 (from the function), not 10.6 (from the deployment target). Therefore, a warning was emitted.
Thanks Nico Weber for pointing this out!