From 9dd834653b811ad20382e98a87dff824980c9916 Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 21 Jun 2015 14:00:56 +0000 Subject: Vendor import of clang trunk r240225: https://llvm.org/svn/llvm-project/cfe/trunk@240225 --- test/FixIt/fixit-nullability-declspec.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/FixIt/fixit-nullability-declspec.cpp (limited to 'test/FixIt/fixit-nullability-declspec.cpp') diff --git a/test/FixIt/fixit-nullability-declspec.cpp b/test/FixIt/fixit-nullability-declspec.cpp new file mode 100644 index 0000000..2ac20b9 --- /dev/null +++ b/test/FixIt/fixit-nullability-declspec.cpp @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fblocks -Werror=nullability-declspec -x c++ -verify %s + +// RUN: cp %s %t +// RUN: not %clang_cc1 -fixit -fblocks -Werror=nullability-declspec -x c++ %t +// RUN: %clang_cc1 -fblocks -Werror=nullability-declspec -x c++ %t + +__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?}} +__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?}} +__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?}} -- cgit v1.1