diff --git a/libcxx/include/__algorithm/three_way_comp_ref_type.h b/libcxx/include/__algorithm/three_way_comp_ref_type.h --- a/libcxx/include/__algorithm/three_way_comp_ref_type.h +++ b/libcxx/include/__algorithm/three_way_comp_ref_type.h @@ -50,7 +50,7 @@ __expected = _Order::greater; if (__o == _Order::greater) __expected = _Order::less; - _LIBCPP_ASSERT(__comp_(__l, __r) == __expected, "Comparator does not induce a strict weak ordering"); + _LIBCPP_ASSERT_UNCATEGORIZED(__comp_(__l, __r) == __expected, "Comparator does not induce a strict weak ordering"); (void)__l; (void)__r; } diff --git a/libcxx/include/__mdspan/layout_left.h b/libcxx/include/__mdspan/layout_left.h --- a/libcxx/include/__mdspan/layout_left.h +++ b/libcxx/include/__mdspan/layout_left.h @@ -137,8 +137,8 @@ // return a value exceeding required_span_size(), which is used to know how large an allocation one needs // Thus, this is a canonical point in multi-dimensional data structures to make invalid element access checks // However, mdspan does check this on its own, so for now we avoid double checking in hardened mode - _LIBCPP_ASSERT(__mdspan_detail::__is_multidimensional_index_in(__extents_, __idx...), - "layout_left::mapping: out of bounds indexing"); + _LIBCPP_ASSERT_UNCATEGORIZED(__mdspan_detail::__is_multidimensional_index_in(__extents_, __idx...), + "layout_left::mapping: out of bounds indexing"); array __idx_a{static_cast(__idx)...}; return [&](index_sequence<_Pos...>) { index_type __res = 0; diff --git a/libcxx/include/__mdspan/layout_right.h b/libcxx/include/__mdspan/layout_right.h --- a/libcxx/include/__mdspan/layout_right.h +++ b/libcxx/include/__mdspan/layout_right.h @@ -136,8 +136,8 @@ // return a value exceeding required_span_size(), which is used to know how large an allocation one needs // Thus, this is a canonical point in multi-dimensional data structures to make invalid element access checks // However, mdspan does check this on its own, so for now we avoid double checking in hardened mode - _LIBCPP_ASSERT(__mdspan_detail::__is_multidimensional_index_in(__extents_, __idx...), - "layout_right::mapping: out of bounds indexing"); + _LIBCPP_ASSERT_UNCATEGORIZED(__mdspan_detail::__is_multidimensional_index_in(__extents_, __idx...), + "layout_right::mapping: out of bounds indexing"); return [&](index_sequence<_Pos...>) { index_type __res = 0; ((__res = static_cast(__idx) + __extents_.extent(_Pos) * __res), ...); diff --git a/libcxx/include/__ranges/repeat_view.h b/libcxx/include/__ranges/repeat_view.h --- a/libcxx/include/__ranges/repeat_view.h +++ b/libcxx/include/__ranges/repeat_view.h @@ -82,13 +82,13 @@ requires copy_constructible<_Tp> : __value_(in_place, __value), __bound_(__bound_sentinel) { if constexpr (!same_as<_Bound, unreachable_sentinel_t>) - _LIBCPP_ASSERT(__bound_ >= 0, "The value of bound must be greater than or equal to 0"); + _LIBCPP_ASSERT_UNCATEGORIZED(__bound_ >= 0, "The value of bound must be greater than or equal to 0"); } _LIBCPP_HIDE_FROM_ABI constexpr explicit repeat_view(_Tp&& __value, _Bound __bound_sentinel = _Bound()) : __value_(in_place, std::move(__value)), __bound_(__bound_sentinel) { if constexpr (!same_as<_Bound, unreachable_sentinel_t>) - _LIBCPP_ASSERT(__bound_ >= 0, "The value of bound must be greater than or equal to 0"); + _LIBCPP_ASSERT_UNCATEGORIZED(__bound_ >= 0, "The value of bound must be greater than or equal to 0"); } template @@ -98,7 +98,7 @@ : __value_(in_place, std::make_from_tuple<_Tp>(std::move(__value_args))), __bound_(std::make_from_tuple<_Bound>(std::move(__bound_args))) { if constexpr (!same_as<_Bound, unreachable_sentinel_t>) - _LIBCPP_ASSERT( + _LIBCPP_ASSERT_UNCATEGORIZED( __bound_ >= 0, "The behavior is undefined if Bound is not unreachable_sentinel_t and bound is negative"); } @@ -161,7 +161,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator--() { if constexpr (!same_as<_Bound, unreachable_sentinel_t>) - _LIBCPP_ASSERT(__current_ > 0, "The value of bound must be greater than or equal to 0"); + _LIBCPP_ASSERT_UNCATEGORIZED(__current_ > 0, "The value of bound must be greater than or equal to 0"); --__current_; return *this; } @@ -174,14 +174,14 @@ _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator+=(difference_type __n) { if constexpr (!same_as<_Bound, unreachable_sentinel_t>) - _LIBCPP_ASSERT(__current_ + __n >= 0, "The value of bound must be greater than or equal to 0"); + _LIBCPP_ASSERT_UNCATEGORIZED(__current_ + __n >= 0, "The value of bound must be greater than or equal to 0"); __current_ += __n; return *this; } _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator-=(difference_type __n) { if constexpr (!same_as<_Bound, unreachable_sentinel_t>) - _LIBCPP_ASSERT(__current_ - __n >= 0, "The value of bound must be greater than or equal to 0"); + _LIBCPP_ASSERT_UNCATEGORIZED(__current_ - __n >= 0, "The value of bound must be greater than or equal to 0"); __current_ -= __n; return *this; } diff --git a/libcxx/src/filesystem/posix_compat.h b/libcxx/src/filesystem/posix_compat.h --- a/libcxx/src/filesystem/posix_compat.h +++ b/libcxx/src/filesystem/posix_compat.h @@ -322,8 +322,8 @@ inline wchar_t* getcwd([[maybe_unused]] wchar_t* in_buf, [[maybe_unused]] size_t in_size) { // Only expected to be used with us allocating the buffer. - _LIBCPP_ASSERT(in_buf == nullptr, "Windows getcwd() assumes in_buf==nullptr"); - _LIBCPP_ASSERT(in_size == 0, "Windows getcwd() assumes in_size==0"); + _LIBCPP_ASSERT_UNCATEGORIZED(in_buf == nullptr, "Windows getcwd() assumes in_buf==nullptr"); + _LIBCPP_ASSERT_UNCATEGORIZED(in_size == 0, "Windows getcwd() assumes in_size==0"); size_t buff_size = MAX_PATH + 10; std::unique_ptr buff(static_cast(malloc(buff_size * sizeof(wchar_t))), &::free);