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
This commit is contained in:
Richard Smith 2020-09-29 17:08:42 -07:00
parent 795d94fdb9
commit afcf9c47c5
2 changed files with 4 additions and 4 deletions

View File

@ -156,7 +156,7 @@ enum class _LIBCPP_ENUM_VIS _NCmpResult : signed char {
struct _CmpUnspecifiedParam {
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEVAL
_CmpUnspecifiedParam(int _CmpUnspecifiedParam::*) {}
_CmpUnspecifiedParam(int _CmpUnspecifiedParam::*) noexcept {}
template<typename _Tp, typename = _VSTD::enable_if_t<!_VSTD::is_same_v<_Tp, int>>>
_CmpUnspecifiedParam(_Tp) = delete;

View File

@ -46,9 +46,9 @@ void test_category(T v) {
void(0 > v);
void(v >= 0);
void(0 >= v);
#ifndef _LIBCPP_HAS_NO_THREE_WAY_COMPARISON
void(v <=> 0); // expected-error 3 {{}}
void(0 <=> v); // expected-error 3 {{}}
#ifndef _LIBCPP_HAS_NO_SPACESHIP_OPERATOR
void(v <=> 0);
void(0 <=> v);
#endif
}