[libcxx-commits] [libcxx] [libc++] Add [[gnu::nodebug]] on type traits (PR #128502)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 5 05:01:15 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Nikolas Klauser (philnik777)
<details>
<summary>Changes</summary>
---
Patch is 36.44 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/128502.diff
32 Files Affected:
- (modified) libcxx/docs/CodingGuidelines.rst (+2-1)
- (modified) libcxx/include/__algorithm/simd_utils.h (+4-4)
- (modified) libcxx/include/__compare/common_comparison_category.h (+1-1)
- (modified) libcxx/include/__compare/compare_three_way_result.h (+2-1)
- (modified) libcxx/include/__functional/bind.h (+3-3)
- (modified) libcxx/include/__iterator/common_iterator.h (+2-2)
- (modified) libcxx/include/__iterator/concepts.h (+4-3)
- (modified) libcxx/include/__iterator/iterator_traits.h (+20-18)
- (modified) libcxx/include/__mdspan/extents.h (+2-2)
- (modified) libcxx/include/__memory/pointer_traits.h (+3-3)
- (modified) libcxx/include/__ranges/drop_view.h (+4-4)
- (modified) libcxx/include/__ranges/repeat_view.h (+2-2)
- (modified) libcxx/include/__ranges/reverse_view.h (+2-2)
- (modified) libcxx/include/__ranges/subrange.h (+4-4)
- (modified) libcxx/include/__ranges/take_view.h (+3-3)
- (modified) libcxx/include/__ranges/transform_view.h (+4-4)
- (modified) libcxx/include/__tuple/make_tuple_types.h (+1-1)
- (modified) libcxx/include/__type_traits/add_rvalue_reference.h (+1-1)
- (modified) libcxx/include/__type_traits/common_reference.h (+4-4)
- (modified) libcxx/include/__type_traits/common_type.h (+1-1)
- (modified) libcxx/include/__type_traits/strip_signature.h (+18-18)
- (modified) libcxx/include/__utility/exception_guard.h (-1)
- (modified) libcxx/include/__utility/no_destroy.h (-1)
- (modified) libcxx/include/__utility/pair.h (+3-5)
- (modified) libcxx/include/__utility/scope_guard.h (-1)
- (modified) libcxx/include/__utility/swap.h (-1)
- (modified) libcxx/include/array (+1-1)
- (modified) libcxx/include/complex (+1-1)
- (modified) libcxx/include/experimental/__simd/declaration.h (+1-1)
- (modified) libcxx/include/tuple (+2-2)
- (modified) libcxx/include/variant (+1-1)
- (modified) libcxx/test/tools/clang_tidy_checks/nodebug_on_aliases.cpp (+19)
``````````diff
diff --git a/libcxx/docs/CodingGuidelines.rst b/libcxx/docs/CodingGuidelines.rst
index 0c85cd07c0f61..2266a7107bc66 100644
--- a/libcxx/docs/CodingGuidelines.rst
+++ b/libcxx/docs/CodingGuidelines.rst
@@ -191,6 +191,7 @@ Library-internal type aliases should be annotated with ``_LIBCPP_NODEBUG``
Libc++ has lots of internal type aliases. Accumulated, these can result in significant amounts of debug information that
users generally don't care about, since users don't try to debug standard library facilities in most cases. For that
reason, all library-internal type aliases that aren't function-local should be annotated with ``_LIBCPP_NODEBUG`` to
-prevent compilers from generating said debug information.
+prevent compilers from generating said debug information. Aliases inside type traits (i.e. alises named ``type``) should
+be annotated for the same reason.
This is enforced by the clang-tidy check ``libcpp-nodebug-on-aliases``.
diff --git a/libcxx/include/__algorithm/simd_utils.h b/libcxx/include/__algorithm/simd_utils.h
index e3c790998e902..6ee7bd4bcbd96 100644
--- a/libcxx/include/__algorithm/simd_utils.h
+++ b/libcxx/include/__algorithm/simd_utils.h
@@ -51,20 +51,20 @@ struct __get_as_integer_type_impl;
template <>
struct __get_as_integer_type_impl<1> {
- using type = uint8_t;
+ using type _LIBCPP_NODEBUG = uint8_t;
};
template <>
struct __get_as_integer_type_impl<2> {
- using type = uint16_t;
+ using type _LIBCPP_NODEBUG = uint16_t;
};
template <>
struct __get_as_integer_type_impl<4> {
- using type = uint32_t;
+ using type _LIBCPP_NODEBUG = uint32_t;
};
template <>
struct __get_as_integer_type_impl<8> {
- using type = uint64_t;
+ using type _LIBCPP_NODEBUG = uint64_t;
};
template <class _Tp>
diff --git a/libcxx/include/__compare/common_comparison_category.h b/libcxx/include/__compare/common_comparison_category.h
index 6ddf9b9d45894..a49499ea4198d 100644
--- a/libcxx/include/__compare/common_comparison_category.h
+++ b/libcxx/include/__compare/common_comparison_category.h
@@ -73,7 +73,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr auto __get_comp_type() {
// [cmp.common], common comparison category type
template <class... _Ts>
struct _LIBCPP_TEMPLATE_VIS common_comparison_category {
- using type = decltype(__comp_detail::__get_comp_type<_Ts...>());
+ using type _LIBCPP_NODEBUG = decltype(__comp_detail::__get_comp_type<_Ts...>());
};
template <class... _Ts>
diff --git a/libcxx/include/__compare/compare_three_way_result.h b/libcxx/include/__compare/compare_three_way_result.h
index 6ee2eff00302d..5327cc57eb580 100644
--- a/libcxx/include/__compare/compare_three_way_result.h
+++ b/libcxx/include/__compare/compare_three_way_result.h
@@ -29,7 +29,8 @@ struct _LIBCPP_HIDE_FROM_ABI __compare_three_way_result<
_Tp,
_Up,
decltype(std::declval<__make_const_lvalue_ref<_Tp>>() <=> std::declval<__make_const_lvalue_ref<_Up>>(), void())> {
- using type = decltype(std::declval<__make_const_lvalue_ref<_Tp>>() <=> std::declval<__make_const_lvalue_ref<_Up>>());
+ using type _LIBCPP_NODEBUG =
+ decltype(std::declval<__make_const_lvalue_ref<_Tp>>() <=> std::declval<__make_const_lvalue_ref<_Up>>());
};
template <class _Tp, class _Up = _Tp>
diff --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h
index a3c327ab40cc9..596cce03cdb58 100644
--- a/libcxx/include/__functional/bind.h
+++ b/libcxx/include/__functional/bind.h
@@ -130,7 +130,7 @@ struct __mu_return_invokable // false
template <class _Ti, class... _Uj>
struct __mu_return_invokable<true, _Ti, _Uj...> {
- using type = __invoke_result_t<_Ti&, _Uj...>;
+ using type _LIBCPP_NODEBUG = __invoke_result_t<_Ti&, _Uj...>;
};
template <class _Ti, class... _Uj>
@@ -181,12 +181,12 @@ struct __bind_return;
template <class _Fp, class... _BoundArgs, class _TupleUj>
struct __bind_return<_Fp, tuple<_BoundArgs...>, _TupleUj, true> {
- using type = __invoke_result_t< _Fp&, typename __mu_return< _BoundArgs, _TupleUj >::type... >;
+ using type _LIBCPP_NODEBUG = __invoke_result_t<_Fp&, typename __mu_return<_BoundArgs, _TupleUj>::type...>;
};
template <class _Fp, class... _BoundArgs, class _TupleUj>
struct __bind_return<_Fp, const tuple<_BoundArgs...>, _TupleUj, true> {
- using type = __invoke_result_t< _Fp&, typename __mu_return< const _BoundArgs, _TupleUj >::type... >;
+ using type _LIBCPP_NODEBUG = __invoke_result_t<_Fp&, typename __mu_return<const _BoundArgs, _TupleUj>::type...>;
};
template <class _Fp, class _BoundArgs, size_t... _Indx, class _Args>
diff --git a/libcxx/include/__iterator/common_iterator.h b/libcxx/include/__iterator/common_iterator.h
index 31fc8267e5afb..7ec384b2034a0 100644
--- a/libcxx/include/__iterator/common_iterator.h
+++ b/libcxx/include/__iterator/common_iterator.h
@@ -272,13 +272,13 @@ concept __common_iter_has_ptr_op = requires(const common_iterator<_Iter, _Sent>&
template <class, class>
struct __arrow_type_or_void {
- using type = void;
+ using type _LIBCPP_NODEBUG = void;
};
template <class _Iter, class _Sent>
requires __common_iter_has_ptr_op<_Iter, _Sent>
struct __arrow_type_or_void<_Iter, _Sent> {
- using type = decltype(std::declval<const common_iterator<_Iter, _Sent>&>().operator->());
+ using type _LIBCPP_NODEBUG = decltype(std::declval<const common_iterator<_Iter, _Sent>&>().operator->());
};
template <input_iterator _Iter, class _Sent>
diff --git a/libcxx/include/__iterator/concepts.h b/libcxx/include/__iterator/concepts.h
index 6e5ac1d3af37b..9e4c456e211b6 100644
--- a/libcxx/include/__iterator/concepts.h
+++ b/libcxx/include/__iterator/concepts.h
@@ -80,12 +80,13 @@ concept __specialization_of_projected = requires {
template <class _Tp>
struct __indirect_value_t_impl {
- using type = iter_value_t<_Tp>&;
+ using type _LIBCPP_NODEBUG = iter_value_t<_Tp>&;
};
template <__specialization_of_projected _Tp>
struct __indirect_value_t_impl<_Tp> {
- using type = invoke_result_t<__projected_projection_t<_Tp>&,
- typename __indirect_value_t_impl<__projected_iterator_t<_Tp>>::type>;
+ using type _LIBCPP_NODEBUG =
+ invoke_result_t<__projected_projection_t<_Tp>&,
+ typename __indirect_value_t_impl<__projected_iterator_t<_Tp>>::type>;
};
template <indirectly_readable _Tp>
diff --git a/libcxx/include/__iterator/iterator_traits.h b/libcxx/include/__iterator/iterator_traits.h
index db68dd2c377ac..4a9fa3cc8f244 100644
--- a/libcxx/include/__iterator/iterator_traits.h
+++ b/libcxx/include/__iterator/iterator_traits.h
@@ -77,7 +77,8 @@ struct _LIBCPP_TEMPLATE_VIS contiguous_iterator_tag : public random_access_itera
template <class _Iter>
struct __iter_traits_cache {
- using type = _If< __is_primary_template<iterator_traits<_Iter> >::value, _Iter, iterator_traits<_Iter> >;
+ using type _LIBCPP_NODEBUG =
+ _If<__is_primary_template<iterator_traits<_Iter> >::value, _Iter, iterator_traits<_Iter> >;
};
template <class _Iter>
using _ITER_TRAITS _LIBCPP_NODEBUG = typename __iter_traits_cache<_Iter>::type;
@@ -101,9 +102,10 @@ struct __test_iter_concept : _IsValidExpansion<_Tester::template _Apply, _Iter>,
template <class _Iter>
struct __iter_concept_cache {
- using type = _Or< __test_iter_concept<_Iter, __iter_concept_concept_test>,
- __test_iter_concept<_Iter, __iter_concept_category_test>,
- __test_iter_concept<_Iter, __iter_concept_random_fallback> >;
+ using type _LIBCPP_NODEBUG =
+ _Or<__test_iter_concept<_Iter, __iter_concept_concept_test>,
+ __test_iter_concept<_Iter, __iter_concept_category_test>,
+ __test_iter_concept<_Iter, __iter_concept_random_fallback> >;
};
template <class _Iter>
@@ -221,12 +223,12 @@ concept __specifies_members = requires {
template <class>
struct __iterator_traits_member_pointer_or_void {
- using type = void;
+ using type _LIBCPP_NODEBUG = void;
};
template <__has_member_pointer _Tp>
struct __iterator_traits_member_pointer_or_void<_Tp> {
- using type = typename _Tp::pointer;
+ using type _LIBCPP_NODEBUG = typename _Tp::pointer;
};
template <class _Tp>
@@ -239,14 +241,14 @@ concept __cpp17_input_iterator_missing_members =
// Otherwise, `pointer` names `void`.
template <class>
struct __iterator_traits_member_pointer_or_arrow_or_void {
- using type = void;
+ using type _LIBCPP_NODEBUG = void;
};
// [iterator.traits]/3.2.1
// If the qualified-id `I::pointer` is valid and denotes a type, `pointer` names that type.
template <__has_member_pointer _Ip>
struct __iterator_traits_member_pointer_or_arrow_or_void<_Ip> {
- using type = typename _Ip::pointer;
+ using type _LIBCPP_NODEBUG = typename _Ip::pointer;
};
// Otherwise, if `decltype(declval<I&>().operator->())` is well-formed, then `pointer` names that
@@ -254,48 +256,48 @@ struct __iterator_traits_member_pointer_or_arrow_or_void<_Ip> {
template <class _Ip>
requires requires(_Ip& __i) { __i.operator->(); } && (!__has_member_pointer<_Ip>)
struct __iterator_traits_member_pointer_or_arrow_or_void<_Ip> {
- using type = decltype(std::declval<_Ip&>().operator->());
+ using type _LIBCPP_NODEBUG = decltype(std::declval<_Ip&>().operator->());
};
// Otherwise, `reference` names `iter-reference-t<I>`.
template <class _Ip>
struct __iterator_traits_member_reference {
- using type = iter_reference_t<_Ip>;
+ using type _LIBCPP_NODEBUG = iter_reference_t<_Ip>;
};
// [iterator.traits]/3.2.2
// If the qualified-id `I::reference` is valid and denotes a type, `reference` names that type.
template <__has_member_reference _Ip>
struct __iterator_traits_member_reference<_Ip> {
- using type = typename _Ip::reference;
+ using type _LIBCPP_NODEBUG = typename _Ip::reference;
};
// [iterator.traits]/3.2.3.4
// input_iterator_tag
template <class _Ip>
struct __deduce_iterator_category {
- using type = input_iterator_tag;
+ using type _LIBCPP_NODEBUG = input_iterator_tag;
};
// [iterator.traits]/3.2.3.1
// `random_access_iterator_tag` if `I` satisfies `cpp17-random-access-iterator`, or otherwise
template <__iterator_traits_detail::__cpp17_random_access_iterator _Ip>
struct __deduce_iterator_category<_Ip> {
- using type = random_access_iterator_tag;
+ using type _LIBCPP_NODEBUG = random_access_iterator_tag;
};
// [iterator.traits]/3.2.3.2
// `bidirectional_iterator_tag` if `I` satisfies `cpp17-bidirectional-iterator`, or otherwise
template <__iterator_traits_detail::__cpp17_bidirectional_iterator _Ip>
struct __deduce_iterator_category<_Ip> {
- using type = bidirectional_iterator_tag;
+ using type _LIBCPP_NODEBUG = bidirectional_iterator_tag;
};
// [iterator.traits]/3.2.3.3
// `forward_iterator_tag` if `I` satisfies `cpp17-forward-iterator`, or otherwise
template <__iterator_traits_detail::__cpp17_forward_iterator _Ip>
struct __deduce_iterator_category<_Ip> {
- using type = forward_iterator_tag;
+ using type _LIBCPP_NODEBUG = forward_iterator_tag;
};
template <class _Ip>
@@ -306,13 +308,13 @@ struct __iterator_traits_iterator_category : __deduce_iterator_category<_Ip> {};
// that type.
template <__has_member_iterator_category _Ip>
struct __iterator_traits_iterator_category<_Ip> {
- using type = typename _Ip::iterator_category;
+ using type _LIBCPP_NODEBUG = typename _Ip::iterator_category;
};
// otherwise, it names void.
template <class>
struct __iterator_traits_difference_type {
- using type = void;
+ using type _LIBCPP_NODEBUG = void;
};
// If the qualified-id `incrementable_traits<I>::difference_type` is valid and denotes a type, then
@@ -320,7 +322,7 @@ struct __iterator_traits_difference_type {
template <class _Ip>
requires requires { typename incrementable_traits<_Ip>::difference_type; }
struct __iterator_traits_difference_type<_Ip> {
- using type = typename incrementable_traits<_Ip>::difference_type;
+ using type _LIBCPP_NODEBUG = typename incrementable_traits<_Ip>::difference_type;
};
// [iterator.traits]/3.4
diff --git a/libcxx/include/__mdspan/extents.h b/libcxx/include/__mdspan/extents.h
index 65a697769bdaa..00454004851d5 100644
--- a/libcxx/include/__mdspan/extents.h
+++ b/libcxx/include/__mdspan/extents.h
@@ -440,13 +440,13 @@ struct __make_dextents;
template <class _IndexType, size_t _Rank, size_t... _ExtentsPack>
struct __make_dextents< _IndexType, _Rank, extents<_IndexType, _ExtentsPack...>> {
- using type =
+ using type _LIBCPP_NODEBUG =
typename __make_dextents< _IndexType, _Rank - 1, extents<_IndexType, dynamic_extent, _ExtentsPack...>>::type;
};
template <class _IndexType, size_t... _ExtentsPack>
struct __make_dextents< _IndexType, 0, extents<_IndexType, _ExtentsPack...>> {
- using type = extents<_IndexType, _ExtentsPack...>;
+ using type _LIBCPP_NODEBUG = extents<_IndexType, _ExtentsPack...>;
};
} // namespace __mdspan_detail
diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h
index afe3d1bf8a2de..d20bac8e4cba2 100644
--- a/libcxx/include/__memory/pointer_traits.h
+++ b/libcxx/include/__memory/pointer_traits.h
@@ -259,20 +259,20 @@ struct __pointer_of {};
template <class _Tp>
requires(__has_pointer<_Tp>::value)
struct __pointer_of<_Tp> {
- using type = typename _Tp::pointer;
+ using type _LIBCPP_NODEBUG = typename _Tp::pointer;
};
template <class _Tp>
requires(!__has_pointer<_Tp>::value && __has_element_type<_Tp>::value)
struct __pointer_of<_Tp> {
- using type = typename _Tp::element_type*;
+ using type _LIBCPP_NODEBUG = typename _Tp::element_type*;
};
template <class _Tp>
requires(!__has_pointer<_Tp>::value && !__has_element_type<_Tp>::value &&
__has_element_type<pointer_traits<_Tp>>::value)
struct __pointer_of<_Tp> {
- using type = typename pointer_traits<_Tp>::element_type*;
+ using type _LIBCPP_NODEBUG = typename pointer_traits<_Tp>::element_type*;
};
template <typename _Tp>
diff --git a/libcxx/include/__ranges/drop_view.h b/libcxx/include/__ranges/drop_view.h
index 3f963d04fff24..42ada9299a779 100644
--- a/libcxx/include/__ranges/drop_view.h
+++ b/libcxx/include/__ranges/drop_view.h
@@ -185,22 +185,22 @@ struct __passthrough_type;
template <class _Tp, size_t _Extent>
struct __passthrough_type<span<_Tp, _Extent>> {
- using type = span<_Tp>;
+ using type _LIBCPP_NODEBUG = span<_Tp>;
};
template <class _CharT, class _Traits>
struct __passthrough_type<basic_string_view<_CharT, _Traits>> {
- using type = basic_string_view<_CharT, _Traits>;
+ using type _LIBCPP_NODEBUG = basic_string_view<_CharT, _Traits>;
};
template <class _Np, class _Bound>
struct __passthrough_type<iota_view<_Np, _Bound>> {
- using type = iota_view<_Np, _Bound>;
+ using type _LIBCPP_NODEBUG = iota_view<_Np, _Bound>;
};
template <class _Iter, class _Sent, subrange_kind _Kind>
struct __passthrough_type<subrange<_Iter, _Sent, _Kind>> {
- using type = subrange<_Iter, _Sent, _Kind>;
+ using type _LIBCPP_NODEBUG = subrange<_Iter, _Sent, _Kind>;
};
template <class _Tp>
diff --git a/libcxx/include/__ranges/repeat_view.h b/libcxx/include/__ranges/repeat_view.h
index 61a8b6357105a..56b09701c8090 100644
--- a/libcxx/include/__ranges/repeat_view.h
+++ b/libcxx/include/__ranges/repeat_view.h
@@ -52,12 +52,12 @@ concept __integer_like_with_usable_difference_type =
template <class _Tp>
struct __repeat_view_iterator_difference {
- using type = _IotaDiffT<_Tp>;
+ using type _LIBCPP_NODEBUG = _IotaDiffT<_Tp>;
};
template <__signed_integer_like _Tp>
struct __repeat_view_iterator_difference<_Tp> {
- using type = _Tp;
+ using type _LIBCPP_NODEBUG = _Tp;
};
template <class _Tp>
diff --git a/libcxx/include/__ranges/reverse_view.h b/libcxx/include/__ranges/reverse_view.h
index 80d54b9a6c83a..c36ba77dd8f6d 100644
--- a/libcxx/include/__ranges/reverse_view.h
+++ b/libcxx/include/__ranges/reverse_view.h
@@ -144,13 +144,13 @@ inline constexpr bool __is_unsized_reverse_subrange<subrange<reverse_iterator<_I
template <class _Tp>
struct __unwrapped_reverse_subrange {
- using type =
+ using type _LIBCPP_NODEBUG =
void; // avoid SFINAE-ing out the overload below -- let the concept requirements do it for better diagnostics
};
template <class _Iter, subrange_kind _Kind>
struct __unwrapped_reverse_subrange<subrange<reverse_iterator<_Iter>, reverse_iterator<_Iter>, _Kind>> {
- using type = subrange<_Iter, _Iter, _Kind>;
+ using type _LIBCPP_NODEBUG = subrange<_Iter, _Iter, _Kind>;
};
struct __fn : __range_adaptor_closure<__fn> {
diff --git a/libcxx/include/__ranges/subrange.h b/libcxx/include/__ranges/subrange.h
index 2d006d3570a79..790fcebff2b8b 100644
--- a/libcxx/include/__ranges/subrange.h
+++ b/libcxx/include/__ranges/subrange.h
@@ -247,22 +247,22 @@ struct tuple_size<ranges::subrange<_Ip, _Sp, _Kp>> : integral_constant<size_t, 2
template <class _Ip, class _Sp, ranges::subrange_kind _Kp>
struct tuple_element<0, ranges::subrange<_Ip, _Sp, _Kp>> {
- using type = _Ip;
+ using type _LIBCPP_NODEBUG = _Ip;
};
template <class _Ip, class _Sp, ranges::subrange_kind _Kp>
struct tuple_element<1, ranges::subrange<_Ip, _Sp, _Kp>> {
- using type = _Sp;
+ using type _LIBCPP_NODEBUG = _Sp;
};
template <class _Ip, class _Sp, ranges::subrange_kind _Kp>
struct tuple_element<0, const ranges::subrange<_Ip, _Sp, _Kp>> {
- using type = _Ip;
+ using type _LIBCPP_NODEBUG = _Ip;
};
template <class _Ip, class _Sp, ranges::subrange_kind _Kp>
struct tuple_element<1, const ranges::subrange<_Ip, _Sp, _Kp>> {
- using type = _Sp;
+ using type _LIBCPP_NODEBUG = _Sp;
};
#endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__ranges/take_view.h b/libcxx/include/__ranges/take_view.h
index 5892c1e31fae1..85723dc5e36b6 100644
--- a/libcxx/include/__ranges/take_view.h
+++ b/libcxx/include/__ranges/take_view.h
@@ -229,18 +229,18 @@ struct __passthrough_type;
template <class _Tp, size_t _Extent>
struct __passthrough_type<span<_Tp, _Extent>> {
- using type = span<_Tp>;
+ using type _LIBCPP_NODEBUG = span<_Tp>;
};
template <class _CharT, class _Traits>
struct __passthrough_type<basic_string_view<_CharT, _Traits>> {
- using type = basic_string_view<_CharT, _Traits>;
+ using type _LIBCPP_NODEBUG = basic_string_view<_CharT, _Traits>;
};
template <class _Iter, class _Sent, subrange_kind _Kind>
requires requires { typename subrange<_Iter>; }
struct __passthrough_type<subrange<_Iter, _Sent, _Kind>> {
- using type = subrange<_Iter>;
+ using type _LIBCPP_NODEBUG = subrange<_Iter>;
};
template <class _Tp>
diff --git a/libcxx/include/__ranges/transform_view.h b/libcxx/include/__ranges/transform_view.h
index 4ae21e92b69d5..74a3b4f684fd0 100644
--- a/libcxx/include/__ranges/transform_view.h
+++ b/libcxx/include/__ranges/transform_view.h
@@ -136,22 +136,22 @@ transform_view(_Range&&, _Fn) -> transform_view<views::all_t<_Range>, _Fn>;
template <class _View>
struct __transform_view_iterator_concept {
- using type = input_iterator_tag;
+ using type _LIBCPP_NODEBUG = input_iterator_tag;
};
template <random_access_range _View>
struct __transform_view_iterator_concept<_View> {
- using type = random_access_iterator_tag;
+ using type _LIBCPP_NODEBUG = random_access_iterator_tag;
};
template <bidirectional_range _View>
struct __transform_view_iterator_concept<_View> {
- using type = bidirectional_iterator_tag;
+ using type _LIBCPP_NODEBUG = bidirectional_iterator_tag;
};
template <forward_range _View>
struct __transform_view_iterator_concept<_View> {
- using type = forward_iterator_tag;
+ using type _LIBCPP_NODEBUG = forward_iterator_tag;
};
template <class, class>
diff --git a/libcxx/include/__tuple/make_tuple_types.h b/libcxx/include/__tuple/make_tuple_types.h
index ff95ca4313a5b..a5c9bcf23a6eb 100644
--- a/libcxx/include/__tuple/make_tuple_types.h
+++ b/libcxx/include/__tuple/make_tuple_types.h
@@ -60,7 +60,7 @@ struct __make_tuple_types {
static_assert(_Sp <= _Ep, "__make_tuple_types input error");
using _RawTp _LIBCPP_NODEBUG = __remove_cvref_t<_Tp>;
using _Maker _LIBCPP_NODEBUG = __make_tuple_types_flat<_RawTp, typename __make_tuple_indices<_Ep, _Sp>::type>;
- using type = typename _Maker::template __apply_quals<_Tp>;
+ using type _LIBCPP_NODEBUG = typename _Maker::template __apply_quals<_Tp>;
};
template <class... _Types, size_t _Ep>
diff --git a/libcxx/include/__type_traits/add_rvalue_reference.h b/...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/128502
More information about the libcxx-commits
mailing list