// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wno-nullability-declspec %s -verify -Wnullable-to-nonnull-conversion -I%S/Inputs
typedef decltype nullptr_t;
;
// Nullability applies to all pointer types.
typedef int ;
typedef int X::* _Nonnull member_data_type_1;
typedef nullptr_t _Nonnull nonnull_nullptr_t; // expected-error{{nullability specifier '_Nonnull' cannot be applied to non-pointer type 'nullptr_t' (aka 'std::nullptr_t')}}
// Nullability can move into member pointers (this is suppressing a warning).
typedef _Nonnull int ;
typedef int ;
typedef _Nonnull int X::* member_data_type_2;
// Adding non-null via a template.
;
typedef AddNonNull<int *>::type nonnull_int_ptr_1;
typedef AddNonNull<int * _Nullable>::type nonnull_int_ptr_2; // FIXME: check that it was overridden
typedef AddNonNull<nullptr_t>::type nonnull_int_ptr_3; // expected-note{{in instantiation of template class}}
typedef AddNonNull<int>::type nonnull_non_pointer_1; // expected-note{{in instantiation of template class 'AddNonNull<int>' requested here}}
// Non-null checking within a template.
;
// Check passing null to a _Nonnull argument.
void ;
void = accepts_nonnull_1;
void ;
void ;
void = accepts_nonnull_4;
void
void
; // expected-note{{instantiation of function template specialization}}
void ;
// Check different forms of assignment to a nonull type from a nullable one.
void
void *_Nullable ;
void
void
void
void