Clang Project

clang_source_code/test/FixIt/fixit-nullability-declspec.cpp
1// RUN: %clang_cc1 -fblocks -Werror=nullability-declspec -x c++ -verify %s
2
3// RUN: cp %s %t
4// RUN: not %clang_cc1 -fixit -fblocks -Werror=nullability-declspec -x c++ %t
5// RUN: %clang_cc1 -fblocks -Werror=nullability-declspec -x c++ %t
6
7_Nullable int *ip1; // expected-error{{nullability specifier '_Nullable' cannot be applied to non-pointer type 'int'; did you mean to apply the specifier to the pointer?}}
8_Nullable int (*fp1)(int); // expected-error{{nullability specifier '_Nullable' cannot be applied to non-pointer type 'int'; did you mean to apply the specifier to the function pointer?}}
9_Nonnull int (^bp1)(int); // expected-error{{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'int'; did you mean to apply the specifier to the block pointer?}}
10