2 // RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing -triple arm64-apple-macosx \
3 // RUN: -x c-header %s -o %t/output.symbols.json -verify
5 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix A
6 void a(void) __attribute__((availability(macos
, introduced
=12.0)));
7 // A-LABEL: "!testLabel": "c:@F@a"
8 // A: "availability": [
10 // A-NEXT: "domain": "macos",
11 // A-NEXT: "introduced": {
12 // A-NEXT: "major": 12,
13 // A-NEXT: "minor": 0,
19 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix B
20 void b(void) __attribute__((availability(macos
, introduced
=11.0, deprecated
=12.0, obsoleted
=20.0)));
21 // B-LABEL: "!testLabel": "c:@F@b"
22 // B: "availability": [
24 // B-NEXT: "deprecated": {
25 // B-NEXT: "major": 12,
26 // B-NEXT: "minor": 0,
29 // B-NEXT: "domain": "macos",
30 // B-NEXT: "introduced": {
31 // B-NEXT: "major": 11,
32 // B-NEXT: "minor": 0,
35 // B-NEXT: "obsoleted": {
36 // B-NEXT: "major": 20,
37 // B-NEXT: "minor": 0,
43 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix E
44 void c(void) __attribute__((availability(macos
, introduced
=11.0, deprecated
=12.0, obsoleted
=20.0))) __attribute__((availability(ios
, introduced
=13.0)));
45 // C-LABEL: "!testLabel": "c:@F@c"
46 // C: "availability": [
48 // C-NEXT: "deprecated": {
49 // C-NEXT: "major": 12,
50 // C-NEXT: "minor": 0,
53 // C-NEXT: "domain": "macos",
54 // C-NEXT: "introduced": {
55 // C-NEXT: "major": 11,
56 // C-NEXT: "minor": 0,
59 // C-NEXT: "obsoleted": {
60 // C-NEXT: "major": 20,
61 // C-NEXT: "minor": 0,
67 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix D
68 void d(void) __attribute__((deprecated
)) __attribute__((availability(macos
, introduced
=11.0)));
69 // D-LABEL: "!testLabel": "c:@F@d"
70 // D: "availability": [
72 // D-NEXT: "domain": "*",
73 // D-NEXT: "isUnconditionallyDeprecated": true
76 // D-NEXT: "domain": "macos",
77 // D-NEXT: "introduced": {
78 // D-NEXT: "major": 11,
79 // D-NEXT: "minor": 0,
85 // This symbol should be dropped as it's unconditionally unavailable
86 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix E
87 void e(void) __attribute__((unavailable
)) __attribute__((availability(macos
, introduced
=11.0)));
88 // E-NOT: "!testLabel": "c:@F@e"
90 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix F
91 void f(void) __attribute__((availability(macos
, unavailable
)));
92 // F-LABEL: "!testLabel": "c:@F@f"
93 // F: "availability": [
95 // F-NEXT: "domain": "macos",
96 // F-NEXT: "isUnconditionallyUnavailable": true
100 // expected-no-diagnostics