diff options
Diffstat (limited to 'test/SemaCXX/nullability.cpp')
-rw-r--r-- | test/SemaCXX/nullability.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/SemaCXX/nullability.cpp b/test/SemaCXX/nullability.cpp index 160741b1409c6..99375a9fdde34 100644 --- a/test/SemaCXX/nullability.cpp +++ b/test/SemaCXX/nullability.cpp @@ -1,10 +1,12 @@ -// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wno-nullability-declspec %s -verify -Wnullable-to-nonnull-conversion +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wno-nullability-declspec %s -verify -Wnullable-to-nonnull-conversion -I%S/Inputs #if __has_feature(nullability) #else # error nullability feature should be defined #endif +#include "nullability-completeness.h" + typedef decltype(nullptr) nullptr_t; class X { @@ -130,3 +132,7 @@ void arraysInLambdas() { withTypedef(nullptr); // expected-warning {{null passed to a callee that requires a non-null argument}} auto withTypedefBad = [](INTS _Nonnull[2]) {}; // expected-error {{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'INTS' (aka 'int [4]')}} } + +void testNullabilityCompletenessWithTemplate() { + Template<int*> tip; +} |