-Wpartial-availability currently fires on the following:
void f1() __attribute__((availability(macos, introduced=10.10))); void f2() __attribute__((availability(macos, introduced=10.10))) { f1(); // warning: f1 is partially available: introduced in 10.10. }
This is bad: f2 is also only available on macOS 10.10, so we know that the call to f1 is safe. This patch fixes this by considering the availability attributes of the lexical context of a use of a declaration when checking it for availability violations.
Thanks!