diff options
Diffstat (limited to 'clang/test/Sema/nullability.c')
-rw-r--r-- | clang/test/Sema/nullability.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Sema/nullability.c b/clang/test/Sema/nullability.c index 8a621d3b5f8..bbe5cb4143a 100644 --- a/clang/test/Sema/nullability.c +++ b/clang/test/Sema/nullability.c @@ -112,4 +112,7 @@ _Nonnull int *returns_int_ptr(int x) { void nullable_to_nonnull(_Nullable int *ptr) { int *a = ptr; // okay _Nonnull int *b = ptr; // expected-warning{{implicit conversion from nullable pointer 'int * _Nullable' to non-nullable pointer type 'int * _Nonnull'}} + b = ptr; // expected-warning{{implicit conversion from nullable pointer 'int * _Nullable' to non-nullable pointer type 'int * _Nonnull'}} + + accepts_nonnull_1(ptr); // expected-warning{{implicit conversion from nullable pointer 'int * _Nullable' to non-nullable pointer type 'int * _Nonnull'}} } |