1 int * _Nonnull forceNullabilityWarnings(void);
2 
3 void arrayParameter(int x[]); // expected-warning {{array parameter is missing a nullability type specifier}}
4 // expected-note@-1 {{insert '_Nullable'}}
5 // expected-note@-2 {{insert '_Nonnull'}}
6 // CHECK: fix-it:"{{.*}}nullability.h":{[[@LINE-3]]:27-[[@LINE-3]]:27}:"_Nullable"
7 // CHECK: fix-it:"{{.*}}nullability.h":{[[@LINE-4]]:27-[[@LINE-4]]:27}:"_Nonnull"
8 
9 void arrayParameterWithSize(int x[5]); // expected-warning {{array parameter is missing a nullability type specifier}}
10 // expected-note@-1 {{insert '_Nullable'}}
11 // expected-note@-2 {{insert '_Nonnull'}}
12 // CHECK: fix-it:"{{.*}}nullability.h":{[[@LINE-3]]:35-[[@LINE-3]]:35}:"_Nullable "
13 // CHECK: fix-it:"{{.*}}nullability.h":{[[@LINE-4]]:35-[[@LINE-4]]:35}:"_Nonnull "
14 
15 void arrayParameterWithStar(int x[*]); // expected-warning {{array parameter is missing a nullability type specifier}}
16 // expected-note@-1 {{insert '_Nullable'}}
17 // expected-note@-2 {{insert '_Nonnull'}}
18 // CHECK: fix-it:"{{.*}}nullability.h":{[[@LINE-3]]:35-[[@LINE-3]]:35}:"_Nullable "
19 // CHECK: fix-it:"{{.*}}nullability.h":{[[@LINE-4]]:35-[[@LINE-4]]:35}:"_Nonnull "
20 
21 
22 // No fix-its on either the macro definition or instantiation.
23 // CHECK-NOT: fix-it:"{{.*}}nullability.h":{[[@LINE+2]]
24 // CHECK-NOT: fix-it:"{{.*}}nullability.h":{[[@LINE+2]]
25 #define PTR(X) X *
26 PTR(int) a; // expected-warning{{pointer is missing a nullability type specifier}}
27 #undef PTR
28