Erik Pilkington | 0535b0f | 2019-01-14 19:17:31 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-macosx10.11 -Wunguarded-availability -fdiagnostics-parseable-fixits -fsyntax-only -verify %s |
Jan Korous | 2325569 | 2018-05-17 11:51:49 +0000 | [diff] [blame] | 2 | |
| 3 | // Testing that even for source code using '_' as a delimiter in availability version tuple '.' is actually used in diagnostic output as a delimiter. |
| 4 | |
| 5 | @interface foo |
Erik Pilkington | 0535b0f | 2019-01-14 19:17:31 +0000 | [diff] [blame] | 6 | - (void) method_bar __attribute__((availability(macosx, introduced = 10_12))); // expected-note {{'method_bar' has been marked as being introduced in macOS 10.12 here, but the deployment target is macOS 10.11.0}} |
Jan Korous | 2325569 | 2018-05-17 11:51:49 +0000 | [diff] [blame] | 7 | @end |
| 8 | |
| 9 | int main() { |
| 10 | [foo method_bar]; // \ |
| 11 | // expected-warning {{'method_bar' is only available on macOS 10.12 or newer}} \ |
| 12 | // expected-note {{enclose 'method_bar' in an @available check to silence this warning}} \ |
| 13 | // CHECK: "fix-it:.*if (@available(macOS 10.12, *))" |
| 14 | return 0; |
| 15 | } |