annotate clang/test/FixIt/fixit-nullability-declspec.cpp @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fblocks -Werror=nullability-declspec -x c++ -verify %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 // RUN: cp %s %t
anatofuz
parents:
diff changeset
4 // RUN: not %clang_cc1 -fixit -fblocks -Werror=nullability-declspec -x c++ %t
anatofuz
parents:
diff changeset
5 // RUN: %clang_cc1 -fblocks -Werror=nullability-declspec -x c++ %t
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
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?}}
anatofuz
parents:
diff changeset
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?}}
anatofuz
parents:
diff changeset
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?}}