| /llvm-project/clang/test/C/C23/ |
| H A D | n3042.c | 19 nullptr_t val; in questionable_behaviors() 36 nullptr_t null_val; in test() 45 nullptr_t ignore = nullptr; in test() 78 alignas(nullptr_t) int aligned; in test() 82 (nullptr_t)12; // expected-error {{cannot cast an object of type 'int' to 'nullptr_t'}} in test() 85 (nullptr_t)0; // expected-error {{cannot cast an object of type 'int' to 'nullptr_t'}} in test() 86 (nullptr_t)(void *)0; // expected-error {{cannot cast an object of type 'void *' to 'nullptr_t'}} in test() 87 (nullptr_t)(int *)12; // expected-error {{cannot cast an object of type 'int *' to 'nullptr_t'}} in test() 95 (nullptr_t)nullptr; // ok in test() 139 _Generic(1 ? nullptr : nullptr, nullptr_t : 0); in test() [all …]
|
| /llvm-project/clang/test/CodeGenCXX/ |
| H A D | nullptr.cpp | 13 typedef decltype(nullptr) nullptr_t; 15 nullptr_t get_nullptr(); 24 return typeid(nullptr_t); in f2() 29 nullptr_t b; 43 nullptr_t pr23833_b(nullptr_t &n) { return n; } 46 struct X2 { operator const nullptr_t&(); }; 69 constexpr nullptr_t null = nullptr; 70 void f(nullptr_t); in g() 12 typedef decltype(nullptr) nullptr_t; global() typedef
|
| /llvm-project/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/ |
| H A D | nullptr_t_deleter.pass.cpp | 34 static_assert( std::is_constructible<std::shared_ptr<int>, std::nullptr_t, test_deleter<int> >::va… 35 static_assert(!std::is_constructible<std::shared_ptr<int>, std::nullptr_t, bad_deleter>::value, ""… 36 static_assert(!std::is_constructible<std::shared_ptr<int>, std::nullptr_t, no_nullptr_deleter>::va… 37 static_assert(!std::is_constructible<std::shared_ptr<int>, std::nullptr_t, no_move_deleter>::value… 40 static_assert( std::is_constructible<std::shared_ptr<int[]>, std::nullptr_t, test_deleter<int> >::… 41 static_assert(!std::is_constructible<std::shared_ptr<int[]>, std::nullptr_t, bad_deleter>::value, … 42 static_assert(!std::is_constructible<std::shared_ptr<int[]>, std::nullptr_t, no_nullptr_deleter>::… 43 static_assert(!std::is_constructible<std::shared_ptr<int[]>, std::nullptr_t, no_move_deleter>::val… 45 static_assert( std::is_constructible<std::shared_ptr<int[5]>, std::nullptr_t, test_deleter<int> >:… 46 static_assert(!std::is_constructible<std::shared_ptr<int[5]>, std::nullptr_t, bad_deleter>::value,… [all …]
|
| H A D | nullptr_t_deleter_allocator.pass.cpp | 35 static_assert( std::is_constructible<std::shared_ptr<int>, std::nullptr_t, test_deleter<int>, test… 36 static_assert(!std::is_constructible<std::shared_ptr<int>, std::nullptr_t, bad_deleter, test_alloc… 37 static_assert(!std::is_constructible<std::shared_ptr<int>, std::nullptr_t, no_nullptr_deleter, tes… 38 static_assert(!std::is_constructible<std::shared_ptr<int>, std::nullptr_t, no_move_deleter, test_a… 41 static_assert( std::is_constructible<std::shared_ptr<int[]>, std::nullptr_t, test_deleter<int>, te… 42 static_assert(!std::is_constructible<std::shared_ptr<int[]>, std::nullptr_t, bad_deleter, test_all… 43 static_assert(!std::is_constructible<std::shared_ptr<int[]>, std::nullptr_t, no_nullptr_deleter, t… 44 static_assert(!std::is_constructible<std::shared_ptr<int[]>, std::nullptr_t, no_move_deleter, test… 46 static_assert( std::is_constructible<std::shared_ptr<int[5]>, std::nullptr_t, test_deleter<int>, t… 47 static_assert(!std::is_constructible<std::shared_ptr<int[5]>, std::nullptr_t, bad_deleter, test_al… [all …]
|
| /llvm-project/clang/test/CXX/drs/ |
| H A D | cwg15xx.cpp | 20 // since-cxx11-error@-1 {{invalid operands to binary expression ('char *' and 'std::nullptr_t')}} in g() 82 using nullptr_t = decltype(nullptr); in test() 83 composite_pointer_type_is_unord<nullptr_t, nullptr_t, nullptr_t>(); in test() 84 no_composite_pointer_type<nullptr_t, int>(); in test() 86 composite_pointer_type_is_unord<nullptr_t, const char**, const char**>(); in test() 87 composite_pointer_type_is_unord<const char**, nullptr_t, const char**>(); in test() 139 using nullptr_t = decltype(nullptr); in test_overload() 140 void(Wrap<nullptr_t>() in test_overload() 77 using nullptr_t = decltype(nullptr); test() typedef 134 using nullptr_t = decltype(nullptr); test_overload() typedef [all...] |
| /llvm-project/clang/test/CodeGen/ |
| H A D | nullptr.c | 4 typedef typeof(nullptr) nullptr_t; typedef 6 nullptr_t nullptr_t_val; 9 void nullptr_func(nullptr_t); 14 nullptr_t nullptr_t_from_nullptr = nullptr; in test() 16 nullptr_t nullptr_t_from_vp = (void *)0; in test() 17 nullptr_t nullptr_t_from_int = 0; in test()
|
| /llvm-project/clang/test/SemaCXX/ |
| H A D | nullptr.cpp | 4 typedef decltype(nullptr) nullptr_t; typedef 13 nullptr_t f(nullptr_t null) in f() 61 nullptr_t *pn = &null; in f() 117 static_assert(__is_scalar(nullptr_t), ""); 118 static_assert(__is_pod(nullptr_t), ""); 119 static_assert(sizeof(nullptr_t) == sizeof(void*), ""); 151 operator nullptr_t() const; 165 template<typename T, nullptr_t Value>
|
| /llvm-project/libcxxabi/test/ |
| H A D | catch_reference_nullptr.pass.cpp | 32 static_assert(std::is_same<std::nullptr_t, decltype(nullptr)>::value, ""); in main() 35 catch_nullptr_test<std::nullptr_t, true>(); in main() 36 catch_nullptr_test<const std::nullptr_t, true>(); in main() 37 catch_nullptr_test<volatile std::nullptr_t, true>(); in main() 38 catch_nullptr_test<const volatile std::nullptr_t, true>(); in main()
|
| /llvm-project/libcxx/test/std/concepts/concepts.lang/concept.convertible/ |
| H A D | convertible_to.pass.cpp | 21 using nullptr_t = decltype(nullptr); typedef 53 CheckNotConvertibleTo<T, nullptr_t>(); in CommonlyNotConvertibleTo() 66 CheckNotConvertibleTo<bool, nullptr_t>(); in CommonlyNotConvertibleTo() 75 template <std::same_as<nullptr_t> > 77 CheckNotConvertibleTo<nullptr_t, void>(); in CommonlyNotConvertibleTo() 78 CheckConvertibleTo<nullptr_t, nullptr_t>(); in CommonlyNotConvertibleTo() 79 CheckConvertibleTo<nullptr_t, void*>(); in CommonlyNotConvertibleTo() 80 CheckConvertibleTo<nullptr_t, int Empty::*>(); in CommonlyNotConvertibleTo() 81 CheckConvertibleTo<nullptr_t, void (Empty::*)()>(); in CommonlyNotConvertibleTo() 82 CheckNotConvertibleTo<nullptr_t, int[2]>(); in CommonlyNotConvertibleTo() [all …]
|
| /llvm-project/libcxx/test/std/language.support/support.types/ |
| H A D | nullptr_t.pass.cpp | 16 // typedef decltype(nullptr) nullptr_t; 20 A(std::nullptr_t) {} 68 static_assert(sizeof(std::nullptr_t) == sizeof(void*), in main() 69 "sizeof(std::nullptr_t) == sizeof(void*)"); in main() 72 test_conversions<std::nullptr_t>(); in main() 82 static_assert(!has_less<std::nullptr_t>::value, ""); in main() 84 test_comparisons<std::nullptr_t>(); in main()
|
| /llvm-project/clang/test/Sema/ |
| H A D | atomic-expr.c | 163 typedef typeof(nullptr) nullptr_t; in func_17() typedef 164 nullptr_t n; in func_17() 165 _Atomic nullptr_t cn2 = n; in func_17() 166 _Atomic nullptr_t cn3 = nullptr; in func_17() 196 typedef typeof(nullptr) nullptr_t; typedef 197 nullptr_t n; 198 …_Atomic nullptr_t cn2 = n; // expected-error {{initializer element is not a compile-time constant}}
|
| H A D | nullptr.c | 4 typedef typeof(nullptr) nullptr_t; typedef 11 nullptr_t f(nullptr_t null) in f() 23 uintptr_t i = nullptr; // expected-error-re {{initializing 'uintptr_t' (aka '{{.*}}') with an expression of incompatible type 'nullptr_t'}} in f() 51 (void)&nullptr; // expected-error {{cannot take the address of an rvalue of type 'nullptr_t'}} in f() 52 nullptr_t *pn = &null; in f() 78 static_assert(sizeof(nullptr_t) == sizeof(void*), ""); 116 static_assert(_Generic(typeof(__nullptr), nullptr_t: true, default: false));
|
| /llvm-project/clang/test/CXX/temp/temp.arg/temp.arg.nontype/ |
| H A D | p1-11.cpp | 5 typedef decltype(nullptr) nullptr_t; 14 constexpr std::nullptr_t get_nullptr() { return nullptr; } 16 constexpr std::nullptr_t np = nullptr; 18 std::nullptr_t nonconst_np; // expected-note{{declared here}} 28 IP<nonconst_np> ip5; // expected-error{{non-type template argument of type 'std::nullptr_t' is not a constant expression}} \ 60 template<std::nullptr_t np> struct NP { // expected-note 2{{template parameter is declared here}} 67 NP<0> np4; // expected-error{{null non-type template argument must be cast to template parameter type 'std::nullptr_t'}} 69 NP<i> np5; // expected-error{{non-type template argument of type 'const int' cannot be converted to a value of type 'std::nullptr_t'}} 4 typedef decltype(nullptr) nullptr_t; global() typedef
|
| /llvm-project/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.special/ |
| H A D | cmp_nullptr.pass.cpp | 14 // constexpr bool operator==(const unique_ptr<T, D>& x, nullptr_t) noexcept; // constexpr since C++23 16 // bool operator==(nullptr_t, const unique_ptr<T, D>& y) noexcept; // removed in C++20 18 // bool operator!=(const unique_ptr<T, D>& x, nullptr_t) noexcept; // removed in C++20 20 // bool operator!=(nullptr_t, const unique_ptr<T, D>& y) noexcept; // removed in C++20 22 // constexpr bool operator<(const unique_ptr<T, D>& x, nullptr_t); // constexpr since C++23 24 // constexpr bool operator<(nullptr_t, const unique_ptr<T, D>& y); // constexpr since C++23 26 // constexpr bool operator<=(const unique_ptr<T, D>& x, nullptr_t); // constexpr since C++23 28 // constexpr bool operator<=(nullptr_t, const unique_ptr<T, D>& y); // constexpr since C++23 30 // constexpr bool operator>(const unique_ptr<T, D>& x, nullptr_t); // constexpr since C++23 32 // constexpr bool operator>(nullptr_t, cons [all...] |
| /llvm-project/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/ |
| H A D | equality_comparable_with.compile.pass.cpp | 943 static_assert(!check_equality_comparable_with<std::nullptr_t, int>()); 944 static_assert(check_equality_comparable_with<std::nullptr_t, int*>()); 945 static_assert(check_equality_comparable_with<std::nullptr_t, int[5]>()); 946 static_assert(check_equality_comparable_with<std::nullptr_t, int (*)()>()); 947 static_assert(check_equality_comparable_with<std::nullptr_t, int (&)()>()); 948 static_assert(check_equality_comparable_with<std::nullptr_t, int (S::*)()>()); 950 check_equality_comparable_with<std::nullptr_t, int (S::*)() noexcept>()); 952 check_equality_comparable_with<std::nullptr_t, int (S::*)() const>()); 953 static_assert(check_equality_comparable_with<std::nullptr_t, 956 check_equality_comparable_with<std::nullptr_t, in [all...] |
| /llvm-project/libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/ |
| H A D | totally_ordered_with.compile.pass.cpp | 534 static_assert(!check_totally_ordered_with<std::nullptr_t, int>()); 536 static_assert(!check_totally_ordered_with<std::nullptr_t, int*>()); 537 static_assert(!check_totally_ordered_with<std::nullptr_t, int[]>()); 538 static_assert(!check_totally_ordered_with<std::nullptr_t, int[5]>()); 539 static_assert(!check_totally_ordered_with<std::nullptr_t, int (*)()>()); 540 static_assert(!check_totally_ordered_with<std::nullptr_t, int (&)()>()); 543 static_assert(!check_totally_ordered_with<std::nullptr_t, int (S::*)()>()); 544 static_assert(!check_totally_ordered_with<std::nullptr_t, int (S::*)() noexcept>()); 545 static_assert(!check_totally_ordered_with<std::nullptr_t, int (S::*)() const>()); 546 static_assert(!check_totally_ordered_with<std::nullptr_t, in [all...] |
| /llvm-project/clang/lib/Headers/ |
| H A D | __stddef_nullptr_t.h | 21 typedef decltype(nullptr) nullptr_t; typedef 23 using ::std::nullptr_t; 26 typedef typeof(nullptr) nullptr_t; typedef
|
| /llvm-project/libcxx/test/std/language.support/cmp/cmp.concept/ |
| H A D | three_way_comparable_with.compile.pass.cpp | 94 static_assert(!check_three_way_comparable_with<std::nullptr_t, int>()); 95 static_assert(!check_three_way_comparable_with<std::nullptr_t, int*>()); 96 static_assert(!check_three_way_comparable_with<std::nullptr_t, int[5]>()); 97 static_assert(!check_three_way_comparable_with<std::nullptr_t, int (*)()>()); 98 static_assert(!check_three_way_comparable_with<std::nullptr_t, int (&)()>()); 99 static_assert(!check_three_way_comparable_with<std::nullptr_t, int (S::*)()>()); 102 static_assert(!check_three_way_comparable_with<void, std::nullptr_t>());
|
| /llvm-project/libcxx/include/__memory/ |
| H A D | unique_ptr.h | 18 #include <__cstddef/nullptr_t.h> 199 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(), __deleter_() {} 271 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(nullptr_t) _NOEXCEPT { 489 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(), __deleter_() {} 514 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(nullptr_t, _LValRefType<_Dummy> __deleter) _NOEXCEPT 531 unique_ptr(nullptr_t, _GoodRValRefType<_Dummy> __deleter) _NOEXCEPT 583 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(nullptr_t) _NOEXCEPT { 621 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void reset(nullptr_t = nullptr) _NOEXCEPT { 691 operator==(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT { 697 inline _LIBCPP_HIDE_FROM_ABI bool operator==(nullptr_t, cons [all...] |
| /llvm-project/libcxx/test/std/concepts/concepts.lang/concept.constructible/ |
| H A D | constructible_from.compile.pass.cpp | 82 test<void*, std::nullptr_t>(); in test() 85 test<int*, std::nullptr_t>(); in test() 94 test<int (*)(int), std::nullptr_t>(); in test() 98 test<void (Empty::*)(const int&), std::nullptr_t>(); in test()
|
| /llvm-project/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/ |
| H A D | not_equal.pass.cpp | 25 using std::nullptr_t; in operator !=() 31 constexpr bool operator!=(const X &, const nullptr_t &) { in operator !=() 35 constexpr bool operator!=(const nullptr_t &, const X &) { in operator !=() 29 operator !=(const X &,const nullptr_t &) operator !=() argument 33 operator !=(const nullptr_t &,const X &) operator !=() argument
|
| H A D | equal.pass.cpp | 25 using std::nullptr_t; in operator ==() 31 constexpr bool operator==(const X &, const nullptr_t &) { in operator ==() 35 constexpr bool operator==(const nullptr_t &, const X &) { in operator ==() 29 operator ==(const X &,const nullptr_t &) operator ==() argument 33 operator ==(const nullptr_t &,const X &) operator ==() argument
|
| /llvm-project/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.cmp/ |
| H A D | cmp_nullptr.pass.cpp | 14 // bool operator==(const shared_ptr<T>& x, nullptr_t) noexcept; 16 // bool operator==(nullptr_t, const shared_ptr<T>& y) noexcept; 18 // bool operator!=(const shared_ptr<T>& x, nullptr_t) noexcept; 20 // bool operator!=(nullptr_t, const shared_ptr<T>& y) noexcept; 22 // bool operator<(const shared_ptr<T>& x, nullptr_t) noexcept; 24 // bool operator<(nullptr_t, const shared_ptr<T>& y) noexcept; 26 // bool operator<=(const shared_ptr<T>& x, nullptr_t) noexcept; 28 // bool operator<=(nullptr_t, const shared_ptr<T>& y) noexcept; 30 // bool operator>(const shared_ptr<T>& x, nullptr_t) noexcept; 32 // bool operator>(nullptr_t, cons [all...] |
| /llvm-project/clang/test/Headers/ |
| H A D | stddefneeds.c | 21 nullptr_t n0; // c99-error{{unknown type name 'nullptr_t'}} c23-error{{unknown type}} \ 49 nullptr_t n1; // c99-error{{unknown type}} c23-error{{unknown type}} \ 81 nullptr_t n2; // c99-error{{unknown type}} c23-error{{unknown type}} \ 102 nullptr_t n3; // c99-error{{unknown type}} c23-error{{unknown type}} \ 123 nullptr_t n4; // c99-error{{unknown type}} c23-error{{unknown type}} \ 143 nullptr_t n5; // c99-error{{unknown type}} c23-error{{unknown type}} \ 165 nullptr_t n6; // c99-error{{unknown type}} c99-modules-error{{unknown type}} 184 nullptr_t n7 ; // c99-error{{unknown type}} c99-modules-error{{unknown type}} 202 nullptr_t n8; // c99-error{{unknown type}} c99-modules-error{{unknown type}} 218 nullptr_t n9; // c99-error{{unknown type}} c99-modules-error{{unknown type}} [all …]
|
| /llvm-project/libcxx/test/std/depr/depr.c.headers/ |
| H A D | stddef_h.compile.pass.cpp | 21 (void)sizeof(nullptr_t); in use() 42 static_assert((std::is_same<decltype(nullptr), nullptr_t>::value), ""); 43 static_assert(sizeof(nullptr_t) == sizeof(void*), "");
|