diff options
Diffstat (limited to 'test/SemaObjCXX/Inputs/nullability-pragmas-1.h')
-rw-r--r-- | test/SemaObjCXX/Inputs/nullability-pragmas-1.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/SemaObjCXX/Inputs/nullability-pragmas-1.h b/test/SemaObjCXX/Inputs/nullability-pragmas-1.h index 9501116924192..4ac813d996181 100644 --- a/test/SemaObjCXX/Inputs/nullability-pragmas-1.h +++ b/test/SemaObjCXX/Inputs/nullability-pragmas-1.h @@ -25,19 +25,19 @@ void f3(A* obj); void f4(int (^block)(int, int)); void f5(int_ptr x); void f6(A_ptr obj); -void f7(int * __nullable x); -void f8(A * __nullable obj); +void f7(int * _Nullable x); +void f8(A * _Nullable obj); void f9(int X::* mem_ptr); void f10(int (X::*mem_func)(int, int)); -void f11(int X::* __nullable mem_ptr); -void f12(int (X::* __nullable mem_func)(int, int)); +void f11(int X::* _Nullable mem_ptr); +void f12(int (X::* _Nullable mem_func)(int, int)); int_ptr f13(void); A *f14(void); -int * __null_unspecified f15(void); -A * __null_unspecified f16(void); -void f17(CFErrorRef *error); // expected-note{{no known conversion from 'A * __nonnull' to 'CFErrorRef __nullable * __nullable' (aka '__CFError **') for 1st argument}} +int * _Null_unspecified f15(void); +A * _Null_unspecified f16(void); +void f17(CFErrorRef *error); // expected-note{{no known conversion from 'A * _Nonnull' to 'CFErrorRef _Nullable * _Nullable' (aka '__CFError **') for 1st argument}} void f18(A **); // expected-warning 2{{pointer is missing a nullability type specifier}} void f19(CFErrorRefPtr error); // expected-warning{{pointer is missing a nullability type specifier}} @@ -64,14 +64,14 @@ void g5(int (**fp)(int, int)); // expected-warning 2{{pointer is missing a nulla int *global_int_ptr; -// typedefs not inferred __nonnull +// typedefs not inferred _Nonnull typedef int *int_ptr_2; typedef int * // expected-warning{{pointer is missing a nullability type specifier}} *int_ptr_ptr; static inline void f30(void) { - float *fp = global_int_ptr; // expected-error{{cannot initialize a variable of type 'float *' with an lvalue of type 'int * __nonnull'}} + float *fp = global_int_ptr; // expected-error{{cannot initialize a variable of type 'float *' with an lvalue of type 'int * _Nonnull'}} int_ptr_2 ip2; float *fp2 = ip2; // expected-error{{cannot initialize a variable of type 'float *' with an lvalue of type 'int_ptr_2' (aka 'int *')}} @@ -83,7 +83,7 @@ static inline void f30(void) { @interface AA : A { @public id ivar1; - __nonnull id ivar2; + _Nonnull id ivar2; } @end @@ -92,8 +92,8 @@ static inline void f30(void) { void f20(A *a); // expected-warning{{pointer is missing a nullability type specifier}} void f21(int_ptr x); // expected-warning{{pointer is missing a nullability type specifier}} void f22(A_ptr y); // expected-warning{{pointer is missing a nullability type specifier}} -void f23(int_ptr __nullable x); -void f24(A_ptr __nullable y); +void f23(int_ptr _Nullable x); +void f24(A_ptr _Nullable y); void f25(int_ptr_2 x); // expected-warning{{pointer is missing a nullability type specifier}} @interface A(OutsidePragmas1) |