1 void f1(int *ptr
); // expected-warning{{pointer is missing a nullability type specifier}}
2 // expected-note@-1 {{insert '_Nullable' if the pointer may be null}}
3 // expected-note@-2 {{insert '_Nonnull' if the pointer should never be null}}
5 void f2(int * _Nonnull
);
7 #include "nullability-consistency-2.h"
9 void f3(int *ptr
) { // expected-warning{{pointer is missing a nullability type specifier}}
10 // expected-note@-1 {{insert '_Nullable' if the pointer may be null}}
11 // expected-note@-2 {{insert '_Nonnull' if the pointer should never be null}}
12 int *other
= ptr
; // shouldn't warn
16 void mf(int *ptr
); // expected-warning{{pointer is missing a nullability type specifier}}
17 // expected-note@-1 {{insert '_Nullable' if the pointer may be null}}
18 // expected-note@-2 {{insert '_Nonnull' if the pointer should never be null}}
19 int X:: *memptr
; // expected-warning{{member pointer is missing a nullability type specifier}}
20 // expected-note@-1 {{insert '_Nullable' if the member pointer may be null}}
21 // expected-note@-2 {{insert '_Nonnull' if the member pointer should never be null}}
26 typedef T
*Base
; // no-warning
27 typedef Base
*type
; // expected-warning{{pointer is missing a nullability type specifier}}
28 // expected-note@-1 {{insert '_Nullable' if the pointer may be null}}
29 // expected-note@-2 {{insert '_Nonnull' if the pointer should never be null}}