2 // RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing -triple arm64-apple-macosx \
3 // RUN: -x objective-c-header %s -o %t/output.symbols.json -verify
6 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix A
7 __attribute__((availability(macos, introduced=9.0, deprecated=12.0, obsoleted=20.0)))
9 // A-LABEL: "!testLabel": "c:objc(cs)A"
10 // A: "availability": [
12 // A-NEXT: "deprecated": {
13 // A-NEXT: "major": 12,
14 // A-NEXT: "minor": 0,
17 // A-NEXT: "domain": "macos"
18 // A-NEXT: "introduced": {
19 // A-NEXT: "major": 9,
20 // A-NEXT: "minor": 0,
23 // A-NEXT: "obsoleted": {
24 // A-NEXT: "major": 20,
25 // A-NEXT: "minor": 0,
31 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix CP
32 @property(class) int CP;
33 // CP-LABEL: "!testLabel": "c:objc(cs)A(cpy)CP"
34 // CP: "availability": [
36 // CP-NEXT: "deprecated": {
37 // CP-NEXT: "major": 12,
38 // CP-NEXT: "minor": 0,
39 // CP-NEXT: "patch": 0
41 // CP-NEXT: "domain": "macos"
42 // CP-NEXT: "introduced": {
43 // CP-NEXT: "major": 9,
44 // CP-NEXT: "minor": 0,
45 // CP-NEXT: "patch": 0
47 // CP-NEXT: "obsoleted": {
48 // CP-NEXT: "major": 20,
49 // CP-NEXT: "minor": 0,
50 // CP-NEXT: "patch": 0
55 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix IP
57 // IP-LABEL: "!testLabel": "c:objc(cs)A(py)IP"
58 // IP: "availability": [
60 // IP-NEXT: "deprecated": {
61 // IP-NEXT: "major": 12,
62 // IP-NEXT: "minor": 0,
63 // IP-NEXT: "patch": 0
65 // IP-NEXT: "domain": "macos"
66 // IP-NEXT: "introduced": {
67 // IP-NEXT: "major": 9,
68 // IP-NEXT: "minor": 0,
69 // IP-NEXT: "patch": 0
71 // IP-NEXT: "obsoleted": {
72 // IP-NEXT: "major": 20,
73 // IP-NEXT: "minor": 0,
74 // IP-NEXT: "patch": 0
79 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix MR
80 @property int moreRestrictive __attribute__((availability(macos, introduced=10.0, deprecated=11.0, obsoleted=19.0)));
81 // MR-LABEL: "!testLabel": "c:objc(cs)A(py)moreRestrictive"
82 // MR: "availability": [
84 // MR-NEXT: "deprecated": {
85 // MR-NEXT: "major": 11,
86 // MR-NEXT: "minor": 0,
87 // MR-NEXT: "patch": 0
89 // MR-NEXT: "domain": "macos"
90 // MR-NEXT: "introduced": {
91 // MR-NEXT: "major": 10,
92 // MR-NEXT: "minor": 0,
93 // MR-NEXT: "patch": 0
95 // MR-NEXT: "obsoleted": {
96 // MR-NEXT: "major": 19,
97 // MR-NEXT: "minor": 0,
98 // MR-NEXT: "patch": 0
105 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix B
106 __attribute__((deprecated("B is deprecated")))
108 // B-LABEL: "!testLabel": "c:objc(cs)B"
109 // B: "availability": [
111 // B-NEXT: "domain": "*"
112 // B-NEXT: "isUnconditionallyDeprecated": true
116 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix BIP
118 // BIP-LABEL: "!testLabel": "c:objc(cs)B(py)BIP"
119 // BIP: "availability": [
121 // BIP-NEXT: "domain": "*"
122 // BIP-NEXT: "isUnconditionallyDeprecated": true
127 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix C
128 __attribute__((availability(macos, unavailable)))
130 // C-LABEL: "!testLabel": "c:objc(cs)C"
131 // C: "availability": [
133 // C-NEXT: "domain": "macos"
134 // C-NEXT: "isUnconditionallyUnavailable": true
138 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix CIP
140 // CIP-LABEL: "!testLabel": "c:objc(cs)C(py)CIP"
141 // CIP: "availability": [
143 // CIP-NEXT: "domain": "macos"
144 // CIP-NEXT: "isUnconditionallyUnavailable": true
150 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix DIP
151 @property int DIP __attribute__((availability(macos, introduced=10.0, deprecated=11.0, obsoleted=19.0)));
152 // DIP-LABEL: "!testLabel": "c:objc(cs)D(py)DIP"
153 // DIP: "availability": [
155 // DIP-NEXT: "deprecated": {
156 // DIP-NEXT: "major": 11,
157 // DIP-NEXT: "minor": 0,
158 // DIP-NEXT: "patch": 0
160 // DIP-NEXT: "domain": "macos"
161 // DIP-NEXT: "introduced": {
162 // DIP-NEXT: "major": 10,
163 // DIP-NEXT: "minor": 0,
164 // DIP-NEXT: "patch": 0
166 // DIP-NEXT: "obsoleted": {
167 // DIP-NEXT: "major": 19,
168 // DIP-NEXT: "minor": 0,
169 // DIP-NEXT: "patch": 0
175 // expected-no-diagnostics