Skip to content

Commit 8a6b44b

Browse files
committed
Revert "[libc++] Fix tests for clang::no_specializations for C++17 and C++20"
This reverts commit 4df9c17. Reason: buildbot breakage (https://lab.llvm.org/buildbot/#/builders/24/builds/4598/steps/10/logs/stdio)
1 parent ac1ba1f commit 8a6b44b

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

libcxx/include/__type_traits/result_of.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2222

2323
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
2424
template <class _Callable>
25-
struct _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_NO_SPECIALIZATIONS result_of;
25+
struct _LIBCPP_DEPRECATED_IN_CXX17 result_of;
2626

2727
template <class _Fp, class... _Args>
2828
struct _LIBCPP_TEMPLATE_VIS result_of<_Fp(_Args...)> : __invoke_result<_Fp, _Args...> {};

libcxx/test/libcxx/ranges/no_specializations.verify.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313

1414
#include <ranges>
1515

16-
#include "test_macros.h"
17-
18-
#if !__has_warning("-Winvalid-specialization") || TEST_STD_VER <= 20
16+
#if !__has_warning("-Winvalid-specialization")
1917
// expected-no-diagnostics
2018
#else
2119
struct S {};

libcxx/test/libcxx/type_traits/no_specializations.verify.cpp

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,15 @@ SPECIALIZE_TRAIT(make_unsigned); // expected-error {{cannot be specialize
3636
SPECIALIZE_TRAIT(remove_all_extents); // expected-error {{cannot be specialized}}
3737
SPECIALIZE_TRAIT(remove_const); // expected-error {{cannot be specialized}}
3838
SPECIALIZE_TRAIT(remove_cv); // expected-error {{cannot be specialized}}
39+
SPECIALIZE_TRAIT(remove_cvref); // expected-error {{cannot be specialized}}
3940
SPECIALIZE_TRAIT(remove_extent); // expected-error {{cannot be specialized}}
4041
SPECIALIZE_TRAIT(remove_pointer); // expected-error {{cannot be specialized}}
4142
SPECIALIZE_TRAIT(remove_reference); // expected-error {{cannot be specialized}}
4243
SPECIALIZE_TRAIT(remove_volatile); // expected-error {{cannot be specialized}}
44+
SPECIALIZE_TRAIT(type_identity); // expected-error {{cannot be specialized}}
4345
SPECIALIZE_TRAIT(underlying_type); // expected-error {{cannot be specialized}}
44-
45-
# if TEST_STD_VER <= 17
46-
SPECIALIZE_TRAIT(result_of); // expected-error {{cannot be specialized}}
47-
# endif
48-
49-
# if TEST_STD_VER >= 20
50-
SPECIALIZE_TRAIT(remove_cvref); // expected-error {{cannot be specialized}}
51-
SPECIALIZE_TRAIT(type_identity); // expected-error {{cannot be specialized}}
52-
SPECIALIZE_TRAIT(unwrap_reference); // expected-error {{cannot be specialized}}
53-
SPECIALIZE_TRAIT(unwrap_ref_decay); // expected-error {{cannot be specialized}}
54-
# endif
46+
SPECIALIZE_TRAIT(unwrap_reference); // expected-error {{cannot be specialized}}
47+
SPECIALIZE_TRAIT(unwrap_ref_decay); // expected-error {{cannot be specialized}}
5548

5649
# undef SPECIALIZE_TRAIT
5750
# define SPECIALIZE_UTT(Trait) \
@@ -103,6 +96,7 @@ SPECIALIZE_UTT(is_move_assignable); // expected-error 2 {{cannot
10396
SPECIALIZE_UTT(is_move_constructible); // expected-error 2 {{cannot be specialized}}
10497
SPECIALIZE_BTT(is_nothrow_assignable); // expected-error 2 {{cannot be specialized}}
10598
SPECIALIZE_UTT(is_nothrow_constructible); // expected-error 2 {{cannot be specialized}}
99+
SPECIALIZE_BTT(is_nothrow_convertible); // expected-error 2 {{cannot be specialized}}
106100
SPECIALIZE_UTT(is_nothrow_copy_assignable); // expected-error 2 {{cannot be specialized}}
107101
SPECIALIZE_UTT(is_nothrow_copy_constructible); // expected-error 2 {{cannot be specialized}}
108102
SPECIALIZE_UTT(is_nothrow_default_constructible); // expected-error 2 {{cannot be specialized}}
@@ -136,6 +130,7 @@ SPECIALIZE_UTT(is_trivially_default_constructible); // expected-error 2 {{cannot
136130
SPECIALIZE_UTT(is_trivially_destructible); // expected-error 2 {{cannot be specialized}}
137131
SPECIALIZE_UTT(is_trivially_move_assignable); // expected-error 2 {{cannot be specialized}}
138132
SPECIALIZE_UTT(is_trivially_move_constructible); // expected-error 2 {{cannot be specialized}}
133+
SPECIALIZE_UTT(is_unbounded_array); // expected-error 2 {{cannot be specialized}}
139134
SPECIALIZE_UTT(is_union); // expected-error 2 {{cannot be specialized}}
140135
SPECIALIZE_UTT(is_unsigned); // expected-error 2 {{cannot be specialized}}
141136
SPECIALIZE_UTT(is_void); // expected-error 2 {{cannot be specialized}}
@@ -145,12 +140,11 @@ SPECIALIZE_UTT(rank); // expected-error 2 {{cannot
145140

146141
# if TEST_STD_VER <= 17
147142
SPECIALIZE_UTT(is_literal_type); // expected-error 2 {{cannot be specialized}}
143+
SPECIALIZE_UTT(result_of); // expected-error 2 {{cannot be specialized}}
148144
# endif
149145

150146
# if TEST_STD_VER >= 20
151-
SPECIALIZE_UTT(is_bounded_array); // expected-error 2 {{cannot be specialized}}
152-
SPECIALIZE_BTT(is_nothrow_convertible); // expected-error 2 {{cannot be specialized}}
153-
SPECIALIZE_UTT(is_unbounded_array); // expected-error 2 {{cannot be specialized}}
147+
SPECIALIZE_UTT(is_bounded_array); // expected-error 2 {{cannot be specialized}}
154148
# endif
155149

156150
# if TEST_STD_VER >= 23
@@ -177,8 +171,6 @@ struct std::conditional<true, S, S>; // expected-error {{cannot be specialized}}
177171
template <>
178172
struct std::enable_if<true, S>; // expected-error {{cannot be specialized}}
179173

180-
#if TEST_STD_VER >= 20
181174
template <>
182175
struct std::integral_constant<S, {}>; // expected-error {{cannot be specialized}}
183176
#endif
184-
#endif

0 commit comments

Comments
 (0)