Skip to content

Commit afcf9c4

Browse files
committed
Fix test failures with trunk clang
- Make the consteval constructor for the zero type be noexcept - Don't expect three-way comparison of 0 against a comparison category to fail
1 parent 795d94f commit afcf9c4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libcxx/include/compare

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ enum class _LIBCPP_ENUM_VIS _NCmpResult : signed char {
156156

157157
struct _CmpUnspecifiedParam {
158158
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEVAL
159-
_CmpUnspecifiedParam(int _CmpUnspecifiedParam::*) {}
159+
_CmpUnspecifiedParam(int _CmpUnspecifiedParam::*) noexcept {}
160160

161161
template<typename _Tp, typename = _VSTD::enable_if_t<!_VSTD::is_same_v<_Tp, int>>>
162162
_CmpUnspecifiedParam(_Tp) = delete;

libcxx/test/std/language.support/cmp/cmp.categories.pre/zero_type.verify.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ void test_category(T v) {
4646
void(0 > v);
4747
void(v >= 0);
4848
void(0 >= v);
49-
#ifndef _LIBCPP_HAS_NO_THREE_WAY_COMPARISON
50-
void(v <=> 0); // expected-error 3 {{}}
51-
void(0 <=> v); // expected-error 3 {{}}
49+
#ifndef _LIBCPP_HAS_NO_SPACESHIP_OPERATOR
50+
void(v <=> 0);
51+
void(0 <=> v);
5252
#endif
5353
}
5454

0 commit comments

Comments
 (0)