You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__attribute__((availability(domain:feature1, UNAVAIL))) intg8=sizeof(g0); // expected-error {{use of 'g0' requires feature 'feature1' to be available}}
69
-
__attribute__((availability(domain:feature2, AVAIL))) intg9=sizeof(g0); // expected-error {{use of 'g0' requires feature 'feature1' to be available}}
70
-
void (*fp0)(void) =func6; // expected-error {{use of 'func6' requires feature 'feature1' to be available}}
68
+
__attribute__((availability(domain:feature1, UNAVAIL))) intg8=sizeof(g0); // expected-error {{cannot use 'g0' because feature 'feature1' is unavailable in this context}}
69
+
__attribute__((availability(domain:feature2, AVAIL))) intg9=sizeof(g0); // expected-error {{cannot use 'g0' because feature 'feature1' is unavailable in this context}}
70
+
void (*fp0)(void) =func6; // expected-error {{cannot use 'func6' because feature 'feature1' is unavailable in this context}}
void (*__attribute__((availability(domain:feature1, UNAVAIL))) fp2)(void) =func6; // expected-error {{use of 'func6' requires feature 'feature1' to be available}}
73
-
void (*__attribute__((availability(domain:feature2, AVAIL))) fp3)(void) =func6; // expected-error {{use of 'func6' requires feature 'feature1' to be available}}
72
+
void (*__attribute__((availability(domain:feature1, UNAVAIL))) fp2)(void) =func6; // expected-error {{cannot use 'func6' because feature 'feature1' is unavailable in this context}}
73
+
void (*__attribute__((availability(domain:feature2, AVAIL))) fp3)(void) =func6; // expected-error {{cannot use 'func6' because feature 'feature1' is unavailable in this context}}
74
74
75
75
voidfunc6(void);
76
76
__attribute__((availability(domain:feature1, AVAIL))) voidfunc6(void); // expected-note {{is incompatible with __attribute__((availability(domain:feature1, 0)))}}
77
77
__attribute__((availability(domain:feature1, UNAVAIL))) voidfunc6(void); // expected-error {{cannot merge incompatible feature attribute to this decl}} expected-note {{feature attribute __attribute__((availability(domain:feature1, 1)))}}
78
-
__attribute__((availability(domain:feature1, AVAIL))) voidfunc8(void); // expected-error {{new feature attributes cannot be added to redeclarations}}
78
+
__attribute__((availability(domain:feature1, AVAIL))) voidfunc8(void); // expected-error {{new domain availability attributes cannot be added to redeclarations}}
79
79
80
80
intg0;
81
81
__attribute__((availability(domain:feature1, AVAIL))) intg0; // expected-note {{is incompatible with __attribute__((availability(domain:feature1, 0)))}}
82
82
__attribute__((availability(domain:feature1, UNAVAIL))) intg0; // expected-error {{cannot merge incompatible feature attribute to this decl}} expected-note {{feature attribute __attribute__((availability(domain:feature1, 1)))}}
83
-
__attribute__((availability(domain:feature1, AVAIL))) intg2;// expected-error {{new feature attributes cannot be added to redeclarations}}
83
+
__attribute__((availability(domain:feature1, AVAIL))) intg2;// expected-error {{new domain availability attributes cannot be added to redeclarations}}
typedefINT0INT2 __attribute__((availability(domain:feature2, UNAVAIL))); // expected-error {{use of 'INT0' requires feature 'feature2' to be available}}
88
-
typedefINT0INT3 __attribute__((availability(domain:feature1, AVAIL))); // expected-error {{use of 'INT0' requires feature 'feature2' to be available}}
87
+
typedefINT0INT2 __attribute__((availability(domain:feature2, UNAVAIL))); // expected-error {{cannot use 'INT0' because feature 'feature2' is unavailable in this context}}
88
+
typedefINT0INT3 __attribute__((availability(domain:feature1, AVAIL))); // expected-error {{cannot use 'INT0' because feature 'feature2' is unavailable in this context}}
89
89
90
90
enum__attribute__((availability(domain:feature1, AVAIL))) E {
func12(); // expected-error {{use of 'func12' requires feature 'feature1' to be available}}
154
-
func7(); // expected-error {{use of 'func7' requires feature 'feature1' to be unavailable}}
153
+
func12(); // expected-error {{cannot use 'func12' because feature 'feature1' is unavailable in this context}}
154
+
func7(); // expected-error {{cannot use 'func7' because feature 'feature1' is available in this context}}}
155
155
func20();
156
156
}();
157
157
158
158
if (__builtin_available(domain:feature1)) {
159
159
^{
160
160
func12();
161
-
func7(); // expected-error {{use of 'func7' requires feature 'feature1' to be unavailable}}
161
+
func7(); // expected-error {{cannot use 'func7' because feature 'feature1' is available in this context}}}
162
162
func20();
163
163
if (__builtin_available(domain:feature2)) {
164
164
func13();
165
-
func9(); // expected-error {{use of 'func9' requires feature 'feature2' to be unavailable}}
165
+
func9(); // expected-error {{cannot use 'func9' because feature 'feature2' is available in this context}}}
166
166
} else {
167
-
func13(); // expected-error {{use of 'func13' requires feature 'feature2' to be available}}
167
+
func13(); // expected-error {{cannot use 'func13' because feature 'feature2' is unavailable in this context}}
168
168
func9();
169
169
}
170
170
}();
171
171
} else {
172
172
^{
173
-
func12(); // expected-error {{use of 'func12' requires feature 'feature1' to be available}}
173
+
func12(); // expected-error {{cannot use 'func12' because feature 'feature1' is unavailable in this context}}
174
174
func7();
175
175
func20();
176
176
}();
177
177
}
178
178
}
179
179
180
-
voidtest4(structS0*s0) { // expected-error {{use of 'S0' requires feature 'feature1' to be available}}
181
-
g11.i0=0; // expected-error {{use of 'g11' requires feature 'feature1' to be available}} expected-error {{use of 'i0' requires feature 'feature1' to be available}}
180
+
voidtest4(structS0*s0) { // expected-error {{cannot use 'S0' because feature 'feature1' is unavailable in this context}}
181
+
g11.i0=0; // expected-error {{cannot use 'g11' because feature 'feature1' is unavailable in this context}} expected-error {{cannot use 'i0' because feature 'feature1' is unavailable in this context}}
182
182
}
183
183
184
184
voidtest5(intc) {
@@ -203,44 +203,44 @@ void test6(void) {
203
203
if (__builtin_available(domain:feature1)) {
204
204
if (__builtin_available(domain:feature2)) {
205
205
func15();
206
-
func16(); // expected-error {{use of 'func16' requires feature 'feature2' to be unavailable}}
207
-
func17(); // expected-error {{use of 'func17' requires feature 'feature1' to be unavailable}}
208
-
func18(); // expected-error {{use of 'func18' requires feature 'feature1' to be unavailable}} expected-error {{use of 'func18' requires feature 'feature2' to be unavailable}}
206
+
func16(); // expected-error {{cannot use 'func16' because feature 'feature2' is available in this context}}}
207
+
func17(); // expected-error {{cannot use 'func17' because feature 'feature1' is available in this context}}}
208
+
func18(); // expected-error {{cannot use 'func18' because feature 'feature1' is available in this context}}} expected-error {{cannot use 'func18' because feature 'feature2' is available in this context}}}
209
209
} else {
210
-
func15(); // expected-error {{use of 'func15' requires feature 'feature2' to be available}}
210
+
func15(); // expected-error {{cannot use 'func15' because feature 'feature2' is unavailable in this context}}
211
211
func16();
212
-
func17(); // expected-error {{use of 'func17' requires feature 'feature1' to be unavailable}} expected-error {{use of 'func17' requires feature 'feature2' to be available}}
213
-
func18(); // expected-error {{use of 'func18' requires feature 'feature1' to be unavailable}}
212
+
func17(); // expected-error {{cannot use 'func17' because feature 'feature1' is available in this context}}} expected-error {{cannot use 'func17' because feature 'feature2' is unavailable in this context}}
213
+
func18(); // expected-error {{cannot use 'func18' because feature 'feature1' is available in this context}}}
214
214
}
215
215
} else {
216
216
if (__builtin_available(domain:feature2)) {
217
-
func15(); // expected-error {{use of 'func15' requires feature 'feature1' to be available}}
218
-
func16(); // expected-error {{use of 'func16' requires feature 'feature1' to be available}} expected-error {{use of 'func16' requires feature 'feature2' to be unavailable}}
217
+
func15(); // expected-error {{cannot use 'func15' because feature 'feature1' is unavailable in this context}}
218
+
func16(); // expected-error {{cannot use 'func16' because feature 'feature1' is unavailable in this context}} expected-error {{cannot use 'func16' because feature 'feature2' is available in this context}}}
219
219
func17();
220
-
func18(); // expected-error {{use of 'func18' requires feature 'feature2' to be unavailable}}
220
+
func18(); // expected-error {{cannot use 'func18' because feature 'feature2' is available in this context}}}
221
221
} else {
222
-
func15(); // expected-error {{use of 'func15' requires feature 'feature1' to be available}} expected-error {{use of 'func15' requires feature 'feature2' to be available}}
223
-
func16(); // expected-error {{use of 'func16' requires feature 'feature1' to be available}}
224
-
func17(); // expected-error {{use of 'func17' requires feature 'feature2' to be available}}
222
+
func15(); // expected-error {{cannot use 'func15' because feature 'feature1' is unavailable in this context}} expected-error {{cannot use 'func15' because feature 'feature2' is unavailable in this context}}
223
+
func16(); // expected-error {{cannot use 'func16' because feature 'feature1' is unavailable in this context}}
224
+
func17(); // expected-error {{cannot use 'func17' because feature 'feature2' is unavailable in this context}}
225
225
func18();
226
226
}
227
227
}
228
228
}
229
229
230
230
voidtest7(void) {
231
-
enumEe; // expected-error {{use of 'E' requires feature 'feature1' to be available}}
232
-
structS0s0; // expected-error {{use of 'S0' requires feature 'feature1' to be available}}
231
+
enumEe; // expected-error {{cannot use 'E' because feature 'feature1' is unavailable in this context}}
232
+
structS0s0; // expected-error {{cannot use 'S0' because feature 'feature1' is unavailable in this context}}
233
233
234
234
if (__builtin_available(domain:feature1)) {
235
235
enumEe;
236
236
e=EA;
237
-
e=EB; // expected-error {{use of 'EB' requires feature 'feature2' to be available}}
237
+
e=EB; // expected-error {{cannot use 'EB' because feature 'feature2' is unavailable in this context}}
238
238
}
239
239
240
240
if (__builtin_available(domain:feature2)) {
241
-
enumEe; // expected-error {{use of 'E' requires feature 'feature1' to be available}}
242
-
e=EA; // expected-error {{use of 'EA' requires feature 'feature1' to be available}}
243
-
e=EB; // expected-error {{use of 'EB' requires feature 'feature1' to be available}}
241
+
enumEe; // expected-error {{cannot use 'E' because feature 'feature1' is unavailable in this context}}
242
+
e=EA; // expected-error {{cannot use 'EA' because feature 'feature1' is unavailable in this context}}
243
+
e=EB; // expected-error {{cannot use 'EB' because feature 'feature1' is unavailable in this context}}
0 commit comments