1 // RUN: %clang_cc1 -fsyntax-only -std=c99 -Wno-nullability-declspec -pedantic %s -verify
3 _Nonnull
int *ptr
; // expected-warning{{type nullability specifier '_Nonnull' is a Clang extension}}
5 #pragma clang diagnostic push
6 #pragma clang diagnostic ignored "-Wnullability-extension"
7 _Nonnull
int *ptr2
; // no-warning
8 #pragma clang diagnostic pop
10 #if !__has_feature(nullability)
11 # error Nullability should always be supported
14 #if !__has_feature(nullability_on_arrays)
15 # error Nullability on array parameters should always be supported
18 #if !__has_extension(nullability)
19 # error Nullability should always be supported as an extension
22 #if !__has_extension(nullability_on_arrays)
23 # error Nullability on array parameters should always be supported as an extension