[libcxx-commits] [libcxx] [libc++] Put [[gnu::nodebug]] on all internal aliases (PR #118710)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 4 15:05:04 PST 2024
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/118710
None
>From 17617b8c49c6467c5545e77777dbbb4bdca20b87 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Wed, 4 Dec 2024 11:16:17 +0100
Subject: [PATCH] [libc++] Put [[gnu::nodebug]] on all internal aliases
---
libcxx/include/__algorithm/comp_ref_type.h | 4 +-
libcxx/include/__algorithm/copy.h | 2 +-
.../include/__algorithm/iterator_operations.h | 18 +++----
libcxx/include/__algorithm/move.h | 2 +-
.../__algorithm/ranges_iterator_concept.h | 2 +-
.../include/__algorithm/ranges_unique_copy.h | 2 +-
libcxx/include/__algorithm/simd_utils.h | 7 +--
libcxx/include/__algorithm/sort.h | 4 +-
.../__algorithm/three_way_comp_ref_type.h | 4 +-
libcxx/include/__algorithm/unwrap_iter.h | 2 +-
libcxx/include/__atomic/aliases.h | 10 ++--
libcxx/include/__atomic/atomic.h | 20 +++----
libcxx/include/__atomic/atomic_ref.h | 10 ++--
libcxx/include/__atomic/atomic_sync.h | 2 +-
libcxx/include/__atomic/contention_t.h | 6 +--
libcxx/include/__atomic/memory_order.h | 2 +-
libcxx/include/__bit_reference | 24 ++++-----
libcxx/include/__chrono/formatter.h | 46 ++++++++--------
libcxx/include/__chrono/hh_mm_ss.h | 2 +-
.../include/__chrono/parser_std_format_spec.h | 2 +-
libcxx/include/__compare/ordering.h | 4 +-
libcxx/include/__compare/synth_three_way.h | 3 +-
libcxx/include/__exception/exception_ptr.h | 2 +-
libcxx/include/__expected/expected.h | 10 ++--
libcxx/include/__expected/unexpected.h | 12 ++---
libcxx/include/__filesystem/path.h | 34 ++++++------
libcxx/include/__flat_map/flat_map.h | 7 +--
libcxx/include/__format/buffer.h | 17 +++---
libcxx/include/__format/concepts.h | 2 +-
libcxx/include/__format/container_adaptor.h | 4 +-
libcxx/include/__format/format_arg.h | 2 +-
libcxx/include/__format/format_arg_store.h | 2 +-
libcxx/include/__format/format_functions.h | 2 +-
.../__format/formatter_floating_point.h | 2 +-
libcxx/include/__format/formatter_string.h | 10 ++--
.../__format/range_default_formatter.h | 13 ++---
libcxx/include/__format/unicode.h | 10 ++--
libcxx/include/__functional/binary_function.h | 4 +-
libcxx/include/__functional/bind.h | 2 +-
.../__functional/boyer_moore_searcher.h | 4 +-
libcxx/include/__functional/function.h | 4 +-
libcxx/include/__functional/perfect_forward.h | 2 +-
libcxx/include/__functional/unary_function.h | 2 +-
libcxx/include/__hash_table | 4 +-
libcxx/include/__iterator/aliasing_iterator.h | 6 +--
libcxx/include/__iterator/concepts.h | 8 +--
libcxx/include/__iterator/insert_iterator.h | 4 +-
libcxx/include/__iterator/iterator_traits.h | 52 +++++++++++--------
libcxx/include/__iterator/projected.h | 12 ++---
.../__iterator/ranges_iterator_traits.h | 6 +--
libcxx/include/__iterator/reverse_iterator.h | 4 +-
.../include/__iterator/segmented_iterator.h | 2 +-
libcxx/include/__locale | 2 +-
libcxx/include/__locale_dir/locale_base_api.h | 2 +-
libcxx/include/__mdspan/extents.h | 13 ++---
libcxx/include/__memory/allocation_guard.h | 4 +-
libcxx/include/__memory/allocator_traits.h | 33 +++++++-----
libcxx/include/__memory/pointer_traits.h | 8 +--
libcxx/include/__memory/shared_ptr.h | 9 ++--
libcxx/include/__memory/unique_ptr.h | 10 ++--
.../__memory/unique_temporary_buffer.h | 2 +-
libcxx/include/__node_handle | 4 +-
libcxx/include/__pstl/backend_fwd.h | 9 ++--
libcxx/include/__pstl/dispatch.h | 3 +-
libcxx/include/__ranges/chunk_by_view.h | 2 +-
libcxx/include/__ranges/drop_view.h | 6 +--
libcxx/include/__ranges/drop_while_view.h | 4 +-
libcxx/include/__ranges/elements_view.h | 4 +-
libcxx/include/__ranges/filter_view.h | 6 +--
libcxx/include/__ranges/iota_view.h | 2 +-
libcxx/include/__ranges/join_view.h | 37 +++++++------
libcxx/include/__ranges/lazy_split_view.h | 11 ++--
libcxx/include/__ranges/repeat_view.h | 5 +-
libcxx/include/__ranges/reverse_view.h | 3 +-
libcxx/include/__ranges/split_view.h | 2 +-
libcxx/include/__ranges/subrange.h | 2 +-
libcxx/include/__ranges/take_view.h | 6 +--
libcxx/include/__ranges/take_while_view.h | 2 +-
libcxx/include/__ranges/transform_view.h | 10 ++--
libcxx/include/__split_buffer | 26 +++++-----
libcxx/include/__stop_token/stop_state.h | 8 +--
libcxx/include/__thread/support/pthread.h | 2 +-
libcxx/include/__tuple/make_tuple_types.h | 11 ++--
libcxx/include/__tuple/sfinae_helpers.h | 2 +-
libcxx/include/__tuple/tuple_size.h | 2 +-
.../__type_traits/add_lvalue_reference.h | 2 +-
libcxx/include/__type_traits/add_pointer.h | 2 +-
.../__type_traits/add_rvalue_reference.h | 2 +-
.../include/__type_traits/common_reference.h | 20 +++----
libcxx/include/__type_traits/common_type.h | 2 +-
libcxx/include/__type_traits/conjunction.h | 2 +-
libcxx/include/__type_traits/copy_cv.h | 10 ++--
libcxx/include/__type_traits/copy_cvref.h | 2 +-
libcxx/include/__type_traits/detected_or.h | 2 +-
libcxx/include/__type_traits/disjunction.h | 2 +-
libcxx/include/__type_traits/invoke.h | 21 ++++----
.../__type_traits/is_always_bitcastable.h | 4 +-
.../include/__type_traits/is_char_like_type.h | 2 +-
.../__type_traits/is_equality_comparable.h | 2 +-
.../__type_traits/is_execution_policy.h | 2 +-
.../__type_traits/is_primary_template.h | 5 +-
libcxx/include/__type_traits/is_same.h | 4 +-
libcxx/include/__type_traits/is_swappable.h | 5 +-
.../__type_traits/make_32_64_or_128_bit.h | 2 +-
.../__type_traits/make_const_lvalue_ref.h | 2 +-
libcxx/include/__type_traits/make_signed.h | 2 +-
libcxx/include/__type_traits/make_unsigned.h | 5 +-
libcxx/include/__type_traits/maybe_const.h | 2 +-
.../__type_traits/remove_all_extents.h | 2 +-
libcxx/include/__type_traits/remove_const.h | 2 +-
.../include/__type_traits/remove_const_ref.h | 2 +-
libcxx/include/__type_traits/remove_cv.h | 4 +-
libcxx/include/__type_traits/remove_cvref.h | 2 +-
libcxx/include/__type_traits/remove_extent.h | 2 +-
libcxx/include/__type_traits/remove_pointer.h | 4 +-
.../include/__type_traits/remove_reference.h | 2 +-
.../include/__type_traits/remove_volatile.h | 2 +-
libcxx/include/__type_traits/void_t.h | 2 +-
libcxx/include/__utility/exception_guard.h | 4 +-
libcxx/include/__utility/forward_like.h | 11 ++--
libcxx/include/__utility/in_place.h | 4 +-
libcxx/include/__utility/integer_sequence.h | 8 +--
libcxx/include/__utility/move.h | 2 +-
libcxx/include/__utility/pair.h | 2 +-
libcxx/include/__utility/swap.h | 5 +-
libcxx/include/__vector/vector.h | 2 +-
libcxx/include/any | 12 +++--
libcxx/include/array | 29 ++++++-----
libcxx/include/barrier | 2 +-
libcxx/include/ccomplex | 9 ++--
libcxx/include/ciso646 | 5 +-
libcxx/include/complex | 2 +-
libcxx/include/cstdalign | 8 +--
libcxx/include/cstdbool | 8 +--
libcxx/include/ctgmath | 10 ++--
libcxx/include/deque | 30 ++++++-----
libcxx/include/experimental/__simd/scalar.h | 6 +--
libcxx/include/experimental/__simd/simd.h | 4 +-
.../include/experimental/__simd/simd_mask.h | 4 +-
libcxx/include/experimental/__simd/vec_ext.h | 6 +--
libcxx/include/forward_list | 3 +-
libcxx/include/ios | 4 +-
libcxx/include/optional | 27 +++++-----
libcxx/include/ratio | 2 +-
libcxx/include/regex | 3 +-
libcxx/include/source_location | 2 +-
libcxx/include/string | 6 +--
libcxx/include/tuple | 3 +-
libcxx/include/variant | 34 ++++++------
.../tools/clang_tidy_checks/CMakeLists.txt | 1 +
.../tools/clang_tidy_checks/libcpp_module.cpp | 2 +
.../nodebug_on_internal_aliases.cpp | 35 +++++++++++++
.../nodebug_on_internal_aliases.hpp | 18 +++++++
.../clang_tidy_checks/uglify_attributes.cpp | 21 ++------
.../tools/clang_tidy_checks/utilities.hpp | 23 ++++++++
libcxx/utils/libcxx/test/params.py | 2 +-
156 files changed, 639 insertions(+), 523 deletions(-)
create mode 100644 libcxx/test/tools/clang_tidy_checks/nodebug_on_internal_aliases.cpp
create mode 100644 libcxx/test/tools/clang_tidy_checks/nodebug_on_internal_aliases.hpp
create mode 100644 libcxx/test/tools/clang_tidy_checks/utilities.hpp
diff --git a/libcxx/include/__algorithm/comp_ref_type.h b/libcxx/include/__algorithm/comp_ref_type.h
index c367fbb91ac282..d98aef40a79ddb 100644
--- a/libcxx/include/__algorithm/comp_ref_type.h
+++ b/libcxx/include/__algorithm/comp_ref_type.h
@@ -56,10 +56,10 @@ struct __debug_less {
// Pass the comparator by lvalue reference. Or in the debug mode, using a debugging wrapper that stores a reference.
#if _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_DEBUG
template <class _Comp>
-using __comp_ref_type = __debug_less<_Comp>;
+using __comp_ref_type [[__gnu__::__nodebug__]] = __debug_less<_Comp>;
#else
template <class _Comp>
-using __comp_ref_type = _Comp&;
+using __comp_ref_type [[__gnu__::__nodebug__]] = _Comp&;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/copy.h b/libcxx/include/__algorithm/copy.h
index 4f30b2050abbaf..210ae3086ab7a5 100644
--- a/libcxx/include/__algorithm/copy.h
+++ b/libcxx/include/__algorithm/copy.h
@@ -47,7 +47,7 @@ struct __copy_impl {
template <class _InIter, class _OutIter>
struct _CopySegment {
- using _Traits = __segmented_iterator_traits<_InIter>;
+ using _Traits [[__gnu__::__nodebug__]] = __segmented_iterator_traits<_InIter>;
_OutIter& __result_;
diff --git a/libcxx/include/__algorithm/iterator_operations.h b/libcxx/include/__algorithm/iterator_operations.h
index 6cdb0aec9b2db8..4ba9072ddf63bd 100644
--- a/libcxx/include/__algorithm/iterator_operations.h
+++ b/libcxx/include/__algorithm/iterator_operations.h
@@ -48,13 +48,13 @@ struct _RangeAlgPolicy {};
template <>
struct _IterOps<_RangeAlgPolicy> {
template <class _Iter>
- using __value_type = iter_value_t<_Iter>;
+ using __value_type [[__gnu__::__nodebug__]] = iter_value_t<_Iter>;
template <class _Iter>
- using __iterator_category = ranges::__iterator_concept<_Iter>;
+ using __iterator_category [[__gnu__::__nodebug__]] = ranges::__iterator_concept<_Iter>;
template <class _Iter>
- using __difference_type = iter_difference_t<_Iter>;
+ using __difference_type [[__gnu__::__nodebug__]] = iter_difference_t<_Iter>;
static constexpr auto advance = ranges::advance;
static constexpr auto distance = ranges::distance;
@@ -72,13 +72,13 @@ struct _ClassicAlgPolicy {};
template <>
struct _IterOps<_ClassicAlgPolicy> {
template <class _Iter>
- using __value_type = typename iterator_traits<_Iter>::value_type;
+ using __value_type [[__gnu__::__nodebug__]] = typename iterator_traits<_Iter>::value_type;
template <class _Iter>
- using __iterator_category = typename iterator_traits<_Iter>::iterator_category;
+ using __iterator_category [[__gnu__::__nodebug__]] = typename iterator_traits<_Iter>::iterator_category;
template <class _Iter>
- using __difference_type = typename iterator_traits<_Iter>::difference_type;
+ using __difference_type [[__gnu__::__nodebug__]] = typename iterator_traits<_Iter>::difference_type;
// advance
template <class _Iter, class _Distance>
@@ -94,10 +94,10 @@ struct _IterOps<_ClassicAlgPolicy> {
}
template <class _Iter>
- using __deref_t = decltype(*std::declval<_Iter&>());
+ using __deref_t [[__gnu__::__nodebug__]] = decltype(*std::declval<_Iter&>());
template <class _Iter>
- using __move_t = decltype(std::move(*std::declval<_Iter&>()));
+ using __move_t [[__gnu__::__nodebug__]] = decltype(std::move(*std::declval<_Iter&>()));
template <class _Iter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 static void __validate_iter_reference() {
@@ -217,7 +217,7 @@ struct _IterOps<_ClassicAlgPolicy> {
};
template <class _AlgPolicy, class _Iter>
-using __policy_iter_diff_t = typename _IterOps<_AlgPolicy>::template __difference_type<_Iter>;
+using __policy_iter_diff_t [[__gnu__::__nodebug__]] = typename _IterOps<_AlgPolicy>::template __difference_type<_Iter>;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/move.h b/libcxx/include/__algorithm/move.h
index 005099dcac06e3..48c3b9061f06f2 100644
--- a/libcxx/include/__algorithm/move.h
+++ b/libcxx/include/__algorithm/move.h
@@ -50,7 +50,7 @@ struct __move_impl {
template <class _InIter, class _OutIter>
struct _MoveSegment {
- using _Traits = __segmented_iterator_traits<_InIter>;
+ using _Traits [[__gnu__::__nodebug__]] = __segmented_iterator_traits<_InIter>;
_OutIter& __result_;
diff --git a/libcxx/include/__algorithm/ranges_iterator_concept.h b/libcxx/include/__algorithm/ranges_iterator_concept.h
index 2af891d3af005a..4846ef4139d0f5 100644
--- a/libcxx/include/__algorithm/ranges_iterator_concept.h
+++ b/libcxx/include/__algorithm/ranges_iterator_concept.h
@@ -44,7 +44,7 @@ consteval auto __get_iterator_concept() {
}
template <class _Iter>
-using __iterator_concept = decltype(__get_iterator_concept<_Iter>());
+using __iterator_concept [[__gnu__::__nodebug__]] = decltype(__get_iterator_concept<_Iter>());
} // namespace ranges
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/ranges_unique_copy.h b/libcxx/include/__algorithm/ranges_unique_copy.h
index 3b4a64e94ca1f5..2b0e7358f47a51 100644
--- a/libcxx/include/__algorithm/ranges_unique_copy.h
+++ b/libcxx/include/__algorithm/ranges_unique_copy.h
@@ -60,7 +60,7 @@ struct __unique_copy {
}
template <class _InIter, class _OutIter>
- using __algo_tag_t = decltype(__get_algo_tag<_InIter, _OutIter>());
+ using __algo_tag_t [[__gnu__::__nodebug__]] = decltype(__get_algo_tag<_InIter, _OutIter>());
template <input_iterator _InIter,
sentinel_for<_InIter> _Sent,
diff --git a/libcxx/include/__algorithm/simd_utils.h b/libcxx/include/__algorithm/simd_utils.h
index 4e3e4f2b9404e3..ab359bb8c8fa97 100644
--- a/libcxx/include/__algorithm/simd_utils.h
+++ b/libcxx/include/__algorithm/simd_utils.h
@@ -70,7 +70,7 @@ struct __get_as_integer_type_impl<8> {
};
template <class _Tp>
-using __get_as_integer_type_t = typename __get_as_integer_type_impl<sizeof(_Tp)>::type;
+using __get_as_integer_type_t [[__gnu__::__nodebug__]] = typename __get_as_integer_type_impl<sizeof(_Tp)>::type;
// This isn't specialized for 64 byte vectors on purpose. They have the potential to significantly reduce performance
// in mixed simd/non-simd workloads and don't provide any performance improvement for currently vectorized algorithms
@@ -90,7 +90,7 @@ inline constexpr size_t __native_vector_size = 1;
# endif
template <class _ArithmeticT, size_t _Np>
-using __simd_vector __attribute__((__ext_vector_type__(_Np))) = _ArithmeticT;
+using __simd_vector __attribute__((__ext_vector_type__(_Np))) [[__gnu__::__nodebug__]] = _ArithmeticT;
template <class _VecT>
inline constexpr size_t __simd_vector_size_v = []<bool _False = false>() -> size_t {
@@ -106,7 +106,8 @@ _LIBCPP_HIDE_FROM_ABI _Tp __simd_vector_underlying_type_impl(__simd_vector<_Tp,
}
template <class _VecT>
-using __simd_vector_underlying_type_t = decltype(std::__simd_vector_underlying_type_impl(_VecT{}));
+using __simd_vector_underlying_type_t [[__gnu__::__nodebug__]] =
+ decltype(std::__simd_vector_underlying_type_impl(_VecT{}));
// This isn't inlined without always_inline when loading chars.
template <class _VecT, class _Iter>
diff --git a/libcxx/include/__algorithm/sort.h b/libcxx/include/__algorithm/sort.h
index ed828b6d723147..9a5f64f9e69f69 100644
--- a/libcxx/include/__algorithm/sort.h
+++ b/libcxx/include/__algorithm/sort.h
@@ -890,10 +890,10 @@ __sort_dispatch(_RandomAccessIterator __first, _RandomAccessIterator __last, _Co
}
template <class _Type, class... _Options>
-using __is_any_of = _Or<is_same<_Type, _Options>...>;
+using __is_any_of [[__gnu__::__nodebug__]] = _Or<is_same<_Type, _Options>...>;
template <class _Type>
-using __sort_is_specialized_in_library = __is_any_of<
+using __sort_is_specialized_in_library [[__gnu__::__nodebug__]] = __is_any_of<
_Type,
char,
#if _LIBCPP_HAS_WIDE_CHARACTERS
diff --git a/libcxx/include/__algorithm/three_way_comp_ref_type.h b/libcxx/include/__algorithm/three_way_comp_ref_type.h
index 5702a1fee08262..a76392988503d6 100644
--- a/libcxx/include/__algorithm/three_way_comp_ref_type.h
+++ b/libcxx/include/__algorithm/three_way_comp_ref_type.h
@@ -61,10 +61,10 @@ struct __debug_three_way_comp {
// Pass the comparator by lvalue reference. Or in the debug mode, using a debugging wrapper that stores a reference.
# if _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_DEBUG
template <class _Comp>
-using __three_way_comp_ref_type = __debug_three_way_comp<_Comp>;
+using __three_way_comp_ref_type [[__gnu__::__nodebug__]] = __debug_three_way_comp<_Comp>;
# else
template <class _Comp>
-using __three_way_comp_ref_type = _Comp&;
+using __three_way_comp_ref_type [[__gnu__::__nodebug__]] = _Comp&;
# endif
#endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__algorithm/unwrap_iter.h b/libcxx/include/__algorithm/unwrap_iter.h
index 8cc0d22d4fc211..57b5a22240bb71 100644
--- a/libcxx/include/__algorithm/unwrap_iter.h
+++ b/libcxx/include/__algorithm/unwrap_iter.h
@@ -46,7 +46,7 @@ struct __unwrap_iter_impl {
// It's a contiguous iterator, so we can use a raw pointer instead
template <class _Iter>
struct __unwrap_iter_impl<_Iter, true> {
- using _ToAddressT = decltype(std::__to_address(std::declval<_Iter>()));
+ using _ToAddressT [[__gnu__::__nodebug__]] = decltype(std::__to_address(std::declval<_Iter>()));
static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap(_Iter __orig_iter, _ToAddressT __unwrapped_iter) {
return __orig_iter + (__unwrapped_iter - std::__to_address(__orig_iter));
diff --git a/libcxx/include/__atomic/aliases.h b/libcxx/include/__atomic/aliases.h
index 37d11dd0aabf36..a95de035cc33ee 100644
--- a/libcxx/include/__atomic/aliases.h
+++ b/libcxx/include/__atomic/aliases.h
@@ -84,19 +84,19 @@ using atomic_uintmax_t = atomic<uintmax_t>;
// C++20 atomic_{signed,unsigned}_lock_free: prefer the contention type most highly, then the largest lock-free type
#if _LIBCPP_STD_VER >= 20
# if ATOMIC_LLONG_LOCK_FREE == 2
-using __largest_lock_free_type = long long;
+using __largest_lock_free_type [[__gnu__::__nodebug__]] = long long;
# elif ATOMIC_INT_LOCK_FREE == 2
-using __largest_lock_free_type = int;
+using __largest_lock_free_type [[__gnu__::__nodebug__]] = int;
# elif ATOMIC_SHORT_LOCK_FREE == 2
-using __largest_lock_free_type = short;
+using __largest_lock_free_type [[__gnu__::__nodebug__]] = short;
# elif ATOMIC_CHAR_LOCK_FREE == 2
-using __largest_lock_free_type = char;
+using __largest_lock_free_type [[__gnu__::__nodebug__]] = char;
# else
# define _LIBCPP_NO_LOCK_FREE_TYPES // There are no lockfree types (this can happen on unusual platforms)
# endif
# ifndef _LIBCPP_NO_LOCK_FREE_TYPES
-using __contention_t_or_largest =
+using __contention_t_or_largest [[__gnu__::__nodebug__]] =
__conditional_t<__libcpp_is_always_lock_free<__cxx_contention_t>::__value,
__cxx_contention_t,
__largest_lock_free_type>;
diff --git a/libcxx/include/__atomic/atomic.h b/libcxx/include/__atomic/atomic.h
index d83719c8733d7e..79dc2277bf7a2e 100644
--- a/libcxx/include/__atomic/atomic.h
+++ b/libcxx/include/__atomic/atomic.h
@@ -143,7 +143,7 @@ struct __atomic_base // false
template <class _Tp>
struct __atomic_base<_Tp, true> : public __atomic_base<_Tp, false> {
- using __base = __atomic_base<_Tp, false>;
+ using __base [[__gnu__::__nodebug__]] = __atomic_base<_Tp, false>;
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __atomic_base() _NOEXCEPT = default;
@@ -228,9 +228,9 @@ struct __atomic_waitable_traits<__atomic_base<_Tp, _IsIntegral> > {
template <class _Tp>
struct atomic : public __atomic_base<_Tp> {
- using __base = __atomic_base<_Tp>;
- using value_type = _Tp;
- using difference_type = value_type;
+ using __base [[__gnu__::__nodebug__]] = __atomic_base<_Tp>;
+ using value_type = _Tp;
+ using difference_type = value_type;
#if _LIBCPP_STD_VER >= 20
_LIBCPP_HIDE_FROM_ABI atomic() = default;
@@ -257,9 +257,9 @@ struct atomic : public __atomic_base<_Tp> {
template <class _Tp>
struct atomic<_Tp*> : public __atomic_base<_Tp*> {
- using __base = __atomic_base<_Tp*>;
- using value_type = _Tp*;
- using difference_type = ptrdiff_t;
+ using __base [[__gnu__::__nodebug__]] = __atomic_base<_Tp*>;
+ using value_type = _Tp*;
+ using difference_type = ptrdiff_t;
_LIBCPP_HIDE_FROM_ABI atomic() _NOEXCEPT = default;
@@ -389,9 +389,9 @@ struct atomic<_Tp> : __atomic_base<_Tp> {
}
public:
- using __base = __atomic_base<_Tp>;
- using value_type = _Tp;
- using difference_type = value_type;
+ using __base [[__gnu__::__nodebug__]] = __atomic_base<_Tp>;
+ using value_type = _Tp;
+ using difference_type = value_type;
_LIBCPP_HIDE_FROM_ABI constexpr atomic() noexcept = default;
_LIBCPP_HIDE_FROM_ABI constexpr atomic(_Tp __d) noexcept : __base(__d) {}
diff --git a/libcxx/include/__atomic/atomic_ref.h b/libcxx/include/__atomic/atomic_ref.h
index eef15983b98331..2ff573f99aab21 100644
--- a/libcxx/include/__atomic/atomic_ref.h
+++ b/libcxx/include/__atomic/atomic_ref.h
@@ -221,7 +221,7 @@ struct __atomic_ref_base {
_LIBCPP_HIDE_FROM_ABI void notify_all() const noexcept { std::__atomic_notify_all(*this); }
protected:
- using _Aligned_Tp [[__gnu__::__aligned__(required_alignment)]] = _Tp;
+ using _Aligned_Tp [[__gnu__::__aligned__(required_alignment), __gnu__::__nodebug__]] = _Tp;
_Aligned_Tp* __ptr_;
_LIBCPP_HIDE_FROM_ABI __atomic_ref_base(_Tp& __obj) : __ptr_(std::addressof(__obj)) {}
@@ -241,7 +241,7 @@ template <class _Tp>
struct atomic_ref : public __atomic_ref_base<_Tp> {
static_assert(is_trivially_copyable_v<_Tp>, "std::atomic_ref<T> requires that 'T' be a trivially copyable type");
- using __base = __atomic_ref_base<_Tp>;
+ using __base [[__gnu__::__nodebug__]] = __atomic_ref_base<_Tp>;
_LIBCPP_HIDE_FROM_ABI explicit atomic_ref(_Tp& __obj) : __base(__obj) {
_LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
@@ -259,7 +259,7 @@ struct atomic_ref : public __atomic_ref_base<_Tp> {
template <class _Tp>
requires(std::integral<_Tp> && !std::same_as<bool, _Tp>)
struct atomic_ref<_Tp> : public __atomic_ref_base<_Tp> {
- using __base = __atomic_ref_base<_Tp>;
+ using __base [[__gnu__::__nodebug__]] = __atomic_ref_base<_Tp>;
using difference_type = __base::value_type;
@@ -305,7 +305,7 @@ struct atomic_ref<_Tp> : public __atomic_ref_base<_Tp> {
template <class _Tp>
requires std::floating_point<_Tp>
struct atomic_ref<_Tp> : public __atomic_ref_base<_Tp> {
- using __base = __atomic_ref_base<_Tp>;
+ using __base [[__gnu__::__nodebug__]] = __atomic_ref_base<_Tp>;
using difference_type = __base::value_type;
@@ -344,7 +344,7 @@ struct atomic_ref<_Tp> : public __atomic_ref_base<_Tp> {
template <class _Tp>
struct atomic_ref<_Tp*> : public __atomic_ref_base<_Tp*> {
- using __base = __atomic_ref_base<_Tp*>;
+ using __base [[__gnu__::__nodebug__]] = __atomic_ref_base<_Tp*>;
using difference_type = ptrdiff_t;
diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h
index a699b60d131844..73dd3ba5c5a619 100644
--- a/libcxx/include/__atomic/atomic_sync.h
+++ b/libcxx/include/__atomic/atomic_sync.h
@@ -82,7 +82,7 @@ struct __atomic_wait_backoff_impl {
_Poll __poll_;
memory_order __order_;
- using __waitable_traits = __atomic_waitable_traits<__decay_t<_AtomicWaitable> >;
+ using __waitable_traits [[__gnu__::__nodebug__]] = __atomic_waitable_traits<__decay_t<_AtomicWaitable> >;
_LIBCPP_AVAILABILITY_SYNC
_LIBCPP_HIDE_FROM_ABI bool
diff --git a/libcxx/include/__atomic/contention_t.h b/libcxx/include/__atomic/contention_t.h
index 65890f338ce990..11ba5b9a9d64e2 100644
--- a/libcxx/include/__atomic/contention_t.h
+++ b/libcxx/include/__atomic/contention_t.h
@@ -20,12 +20,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
#if defined(__linux__) || (defined(_AIX) && !defined(__64BIT__))
-using __cxx_contention_t = int32_t;
+using __cxx_contention_t [[__gnu__::__nodebug__]] = int32_t;
#else
-using __cxx_contention_t = int64_t;
+using __cxx_contention_t [[__gnu__::__nodebug__]] = int64_t;
#endif // __linux__ || (_AIX && !__64BIT__)
-using __cxx_atomic_contention_t = __cxx_atomic_impl<__cxx_contention_t>;
+using __cxx_atomic_contention_t [[__gnu__::__nodebug__]] = __cxx_atomic_impl<__cxx_contention_t>;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__atomic/memory_order.h b/libcxx/include/__atomic/memory_order.h
index 294121d1c4e7f4..5d51e1b15b3a75 100644
--- a/libcxx/include/__atomic/memory_order.h
+++ b/libcxx/include/__atomic/memory_order.h
@@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// to pin the underlying type in C++20.
enum __legacy_memory_order { __mo_relaxed, __mo_consume, __mo_acquire, __mo_release, __mo_acq_rel, __mo_seq_cst };
-using __memory_order_underlying_t = underlying_type<__legacy_memory_order>::type;
+using __memory_order_underlying_t [[__gnu__::__nodebug__]] = underlying_type<__legacy_memory_order>::type;
#if _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__bit_reference b/libcxx/include/__bit_reference
index 22637d43974123..10fce5cc689176 100644
--- a/libcxx/include/__bit_reference
+++ b/libcxx/include/__bit_reference
@@ -45,8 +45,8 @@ struct __has_storage_type {
template <class _Cp, bool = __has_storage_type<_Cp>::value>
class __bit_reference {
- using __storage_type = typename _Cp::__storage_type;
- using __storage_pointer = typename _Cp::__storage_pointer;
+ using __storage_type [[__gnu__::__nodebug__]] = typename _Cp::__storage_type;
+ using __storage_pointer [[__gnu__::__nodebug__]] = typename _Cp::__storage_pointer;
__storage_pointer __seg_;
__storage_type __mask_;
@@ -57,7 +57,7 @@ class __bit_reference {
friend class __bit_iterator<_Cp, false>;
public:
- using __container = typename _Cp::__self;
+ using __container [[__gnu__::__nodebug__]] = typename _Cp::__self;
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_reference(const __bit_reference&) = default;
@@ -137,8 +137,8 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(bool& __x,
template <class _Cp>
class __bit_const_reference {
- using __storage_type = typename _Cp::__storage_type;
- using __storage_pointer = typename _Cp::__const_storage_pointer;
+ using __storage_type [[__gnu__::__nodebug__]] = typename _Cp::__storage_type;
+ using __storage_pointer [[__gnu__::__nodebug__]] = typename _Cp::__const_storage_pointer;
__storage_pointer __seg_;
__storage_type __mask_;
@@ -147,7 +147,7 @@ class __bit_const_reference {
friend class __bit_iterator<_Cp, true>;
public:
- using __container = typename _Cp::__self;
+ using __container [[__gnu__::__nodebug__]] = typename _Cp::__self;
_LIBCPP_HIDE_FROM_ABI __bit_const_reference(const __bit_const_reference&) = default;
__bit_const_reference& operator=(const __bit_const_reference&) = delete;
@@ -589,10 +589,10 @@ inline _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cr, false> swap_ranges(
template <class _Cp>
struct __bit_array {
- using difference_type = typename _Cp::difference_type;
- using __storage_type = typename _Cp::__storage_type;
- using __storage_pointer = typename _Cp::__storage_pointer;
- using iterator = typename _Cp::iterator;
+ using difference_type [[__gnu__::__nodebug__]] = typename _Cp::difference_type;
+ using __storage_type [[__gnu__::__nodebug__]] = typename _Cp::__storage_type;
+ using __storage_pointer [[__gnu__::__nodebug__]] = typename _Cp::__storage_pointer;
+ using iterator [[__gnu__::__nodebug__]] = typename _Cp::iterator;
static const unsigned __bits_per_word = _Cp::__bits_per_word;
static const unsigned _Np = 4;
@@ -792,8 +792,8 @@ public:
using iterator_category = random_access_iterator_tag;
private:
- using __storage_type = typename _Cp::__storage_type;
- using __storage_pointer =
+ using __storage_type [[__gnu__::__nodebug__]] = typename _Cp::__storage_type;
+ using __storage_pointer [[__gnu__::__nodebug__]] =
__conditional_t<_IsConst, typename _Cp::__const_storage_pointer, typename _Cp::__storage_pointer>;
static const unsigned __bits_per_word = _Cp::__bits_per_word;
diff --git a/libcxx/include/__chrono/formatter.h b/libcxx/include/__chrono/formatter.h
index 3671e6aa52b49c..9f5571d7fddf8a 100644
--- a/libcxx/include/__chrono/formatter.h
+++ b/libcxx/include/__chrono/formatter.h
@@ -711,7 +711,7 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_chrono {
template <class _Duration, __fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::sys_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -722,7 +722,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::sys_time<_Duration>, _CharT> : pub
template <class _Duration, __fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::file_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -733,7 +733,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::file_time<_Duration>, _CharT> : pu
template <class _Duration, __fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::local_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -745,7 +745,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::local_time<_Duration>, _CharT> : p
template <class _Rep, class _Period, __fmt_char_type _CharT>
struct formatter<chrono::duration<_Rep, _Period>, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -767,7 +767,7 @@ struct formatter<chrono::duration<_Rep, _Period>, _CharT> : public __formatter_c
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::day, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -778,7 +778,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::day, _CharT> : public __formatter_
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -789,7 +789,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month, _CharT> : public __formatte
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -800,7 +800,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year, _CharT> : public __formatter
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::weekday, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -811,7 +811,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::weekday, _CharT> : public __format
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::weekday_indexed, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -822,7 +822,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::weekday_indexed, _CharT> : public
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::weekday_last, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -833,7 +833,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::weekday_last, _CharT> : public __f
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_day, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -844,7 +844,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_day, _CharT> : public __form
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_day_last, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -855,7 +855,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_day_last, _CharT> : public _
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_weekday, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -866,7 +866,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_weekday, _CharT> : public __
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_weekday_last, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -877,7 +877,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_weekday_last, _CharT> : publ
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -888,7 +888,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month, _CharT> : public __for
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_day, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -899,7 +899,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_day, _CharT> : public _
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_day_last, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -910,7 +910,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_day_last, _CharT> : pub
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_weekday, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -921,7 +921,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_weekday, _CharT> : publ
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_weekday_last, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -932,7 +932,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_weekday_last, _CharT> :
template <class _Duration, __fmt_char_type _CharT>
struct formatter<chrono::hh_mm_ss<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -944,7 +944,7 @@ struct formatter<chrono::hh_mm_ss<_Duration>, _CharT> : public __formatter_chron
template <__fmt_char_type _CharT>
struct formatter<chrono::sys_info, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -955,7 +955,7 @@ struct formatter<chrono::sys_info, _CharT> : public __formatter_chrono<_CharT> {
template <__fmt_char_type _CharT>
struct formatter<chrono::local_info, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -968,7 +968,7 @@ struct formatter<chrono::local_info, _CharT> : public __formatter_chrono<_CharT>
template <class _Duration, class _TimeZonePtr, __fmt_char_type _CharT>
struct formatter<chrono::zoned_time<_Duration, _TimeZonePtr>, _CharT> : public __formatter_chrono<_CharT> {
public:
- using _Base = __formatter_chrono<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_chrono<_CharT>;
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
diff --git a/libcxx/include/__chrono/hh_mm_ss.h b/libcxx/include/__chrono/hh_mm_ss.h
index c460b113050859..2f86b578d54666 100644
--- a/libcxx/include/__chrono/hh_mm_ss.h
+++ b/libcxx/include/__chrono/hh_mm_ss.h
@@ -30,7 +30,7 @@ template <class _Duration>
class hh_mm_ss {
private:
static_assert(__is_duration_v<_Duration>, "template parameter of hh_mm_ss must be a std::chrono::duration");
- using __CommonType = common_type_t<_Duration, chrono::seconds>;
+ using __CommonType [[__gnu__::__nodebug__]] = common_type_t<_Duration, chrono::seconds>;
_LIBCPP_HIDE_FROM_ABI static constexpr uint64_t __pow10(unsigned __exp) {
uint64_t __ret = 1;
diff --git a/libcxx/include/__chrono/parser_std_format_spec.h b/libcxx/include/__chrono/parser_std_format_spec.h
index 3976864c12b983..0b5060f8458229 100644
--- a/libcxx/include/__chrono/parser_std_format_spec.h
+++ b/libcxx/include/__chrono/parser_std_format_spec.h
@@ -140,7 +140,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __validate_time_zone(__flags __flags) {
template <class _CharT>
class _LIBCPP_TEMPLATE_VIS __parser_chrono {
- using _ConstIterator = typename basic_format_parse_context<_CharT>::const_iterator;
+ using _ConstIterator [[__gnu__::__nodebug__]] = typename basic_format_parse_context<_CharT>::const_iterator;
public:
template <class _ParseContext>
diff --git a/libcxx/include/__compare/ordering.h b/libcxx/include/__compare/ordering.h
index 297218e6f29e5e..d7f8ff66edc5e1 100644
--- a/libcxx/include/__compare/ordering.h
+++ b/libcxx/include/__compare/ordering.h
@@ -120,7 +120,7 @@ inline constexpr partial_ordering partial_ordering::greater(_PartialOrdResult::_
inline constexpr partial_ordering partial_ordering::unordered(_PartialOrdResult::__unordered);
class weak_ordering {
- using _ValueT = signed char;
+ using _ValueT [[__gnu__::__nodebug__]] = signed char;
_LIBCPP_HIDE_FROM_ABI explicit constexpr weak_ordering(_OrdResult __v) noexcept : __value_(_ValueT(__v)) {}
@@ -190,7 +190,7 @@ inline constexpr weak_ordering weak_ordering::equivalent(_OrdResult::__equiv);
inline constexpr weak_ordering weak_ordering::greater(_OrdResult::__greater);
class strong_ordering {
- using _ValueT = signed char;
+ using _ValueT [[__gnu__::__nodebug__]] = signed char;
_LIBCPP_HIDE_FROM_ABI explicit constexpr strong_ordering(_OrdResult __v) noexcept : __value_(_ValueT(__v)) {}
diff --git a/libcxx/include/__compare/synth_three_way.h b/libcxx/include/__compare/synth_three_way.h
index e48ce497998368..fc89dad0689bf3 100644
--- a/libcxx/include/__compare/synth_three_way.h
+++ b/libcxx/include/__compare/synth_three_way.h
@@ -43,7 +43,8 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr auto __synth_three_way = []<class _Tp, cl
};
template <class _Tp, class _Up = _Tp>
-using __synth_three_way_result = decltype(std::__synth_three_way(std::declval<_Tp&>(), std::declval<_Up&>()));
+using __synth_three_way_result [[__gnu__::__nodebug__]] =
+ decltype(std::__synth_three_way(std::declval<_Tp&>(), std::declval<_Up&>()));
#endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__exception/exception_ptr.h b/libcxx/include/__exception/exception_ptr.h
index c43c005603dd7a..9af9b468913f88 100644
--- a/libcxx/include/__exception/exception_ptr.h
+++ b/libcxx/include/__exception/exception_ptr.h
@@ -67,7 +67,7 @@ class _LIBCPP_EXPORTED_FROM_ABI exception_ptr {
public:
// exception_ptr is basically a COW string.
- using __trivially_relocatable = exception_ptr;
+ using __trivially_relocatable [[__gnu__::__nodebug__]] = exception_ptr;
_LIBCPP_HIDE_FROM_ABI exception_ptr() _NOEXCEPT : __ptr_() {}
_LIBCPP_HIDE_FROM_ABI exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
diff --git a/libcxx/include/__expected/expected.h b/libcxx/include/__expected/expected.h
index 3d3f11967ee746..23adbc35881d64 100644
--- a/libcxx/include/__expected/expected.h
+++ b/libcxx/include/__expected/expected.h
@@ -459,14 +459,14 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Up, class _OtherErr>
friend class expected;
- using __base = __expected_base<_Tp, _Err>;
+ using __base [[__gnu__::__nodebug__]] = __expected_base<_Tp, _Err>;
public:
using value_type = _Tp;
using error_type = _Err;
using unexpected_type = unexpected<_Err>;
- using __trivially_relocatable =
+ using __trivially_relocatable [[__gnu__::__nodebug__]] =
__conditional_t<__libcpp_is_trivially_relocatable<_Tp>::value && __libcpp_is_trivially_relocatable<_Err>::value,
expected,
void>;
@@ -505,7 +505,7 @@ class expected : private __expected_base<_Tp, _Err> {
private:
template <class _Up, class _OtherErr, class _UfQual, class _OtherErrQual>
- using __can_convert = _And<
+ using __can_convert [[__gnu__::__nodebug__]] = _And<
is_constructible<_Tp, _UfQual>,
is_constructible<_Err, _OtherErrQual>,
_If<_Not<is_same<remove_cv_t<_Tp>, bool>>::value,
@@ -1363,7 +1363,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
friend class expected;
template <class _Up, class _OtherErr, class _OtherErrQual>
- using __can_convert =
+ using __can_convert [[__gnu__::__nodebug__]] =
_And< is_void<_Up>,
is_constructible<_Err, _OtherErrQual>,
_Not<is_constructible<unexpected<_Err>, expected<_Up, _OtherErr>&>>,
@@ -1371,7 +1371,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
_Not<is_constructible<unexpected<_Err>, const expected<_Up, _OtherErr>&>>,
_Not<is_constructible<unexpected<_Err>, const expected<_Up, _OtherErr>>>>;
- using __base = __expected_void_base<_Err>;
+ using __base [[__gnu__::__nodebug__]] = __expected_void_base<_Err>;
public:
using value_type = _Tp;
diff --git a/libcxx/include/__expected/unexpected.h b/libcxx/include/__expected/unexpected.h
index cf110bcf69a827..679720da235cd3 100644
--- a/libcxx/include/__expected/unexpected.h
+++ b/libcxx/include/__expected/unexpected.h
@@ -48,12 +48,12 @@ template <class _Err>
struct __is_std_unexpected<unexpected<_Err>> : true_type {};
template <class _Tp>
-using __valid_std_unexpected = _BoolConstant< //
- is_object_v<_Tp> && //
- !is_array_v<_Tp> && //
- !__is_std_unexpected<_Tp>::value && //
- !is_const_v<_Tp> && //
- !is_volatile_v<_Tp> //
+using __valid_std_unexpected [[__gnu__::__nodebug__]] = _BoolConstant< //
+ is_object_v<_Tp> && //
+ !is_array_v<_Tp> && //
+ !__is_std_unexpected<_Tp>::value && //
+ !is_const_v<_Tp> && //
+ !is_volatile_v<_Tp> //
>;
template <class _Err>
diff --git a/libcxx/include/__filesystem/path.h b/libcxx/include/__filesystem/path.h
index 509d1cc8052f0d..2d479c7ab66eb1 100644
--- a/libcxx/include/__filesystem/path.h
+++ b/libcxx/include/__filesystem/path.h
@@ -51,30 +51,30 @@ template <class _Tp>
struct __can_convert_char<const _Tp> : public __can_convert_char<_Tp> {};
template <>
struct __can_convert_char<char> {
- static const bool value = true;
- using __char_type = char;
+ static const bool value = true;
+ using __char_type [[__gnu__::__nodebug__]] = char;
};
template <>
struct __can_convert_char<wchar_t> {
- static const bool value = true;
- using __char_type = wchar_t;
+ static const bool value = true;
+ using __char_type [[__gnu__::__nodebug__]] = wchar_t;
};
# if _LIBCPP_HAS_CHAR8_T
template <>
struct __can_convert_char<char8_t> {
- static const bool value = true;
- using __char_type = char8_t;
+ static const bool value = true;
+ using __char_type [[__gnu__::__nodebug__]] = char8_t;
};
# endif
template <>
struct __can_convert_char<char16_t> {
- static const bool value = true;
- using __char_type = char16_t;
+ static const bool value = true;
+ using __char_type [[__gnu__::__nodebug__]] = char16_t;
};
template <>
struct __can_convert_char<char32_t> {
- static const bool value = true;
- using __char_type = char32_t;
+ static const bool value = true;
+ using __char_type [[__gnu__::__nodebug__]] = char32_t;
};
template <class _ECharT, __enable_if_t<__can_convert_char<_ECharT>::value, int> = 0>
@@ -95,7 +95,7 @@ typedef string __u8_string;
struct _NullSentinel {};
template <class _Tp>
-using _Void = void;
+using _Void [[__gnu__::__nodebug__]] = void;
template <class _Tp, class = void>
struct __is_pathable_string : public false_type {};
@@ -104,7 +104,7 @@ template <class _ECharT, class _Traits, class _Alloc>
struct __is_pathable_string< basic_string<_ECharT, _Traits, _Alloc>,
_Void<typename __can_convert_char<_ECharT>::__char_type> >
: public __can_convert_char<_ECharT> {
- using _Str = basic_string<_ECharT, _Traits, _Alloc>;
+ using _Str [[__gnu__::__nodebug__]] = basic_string<_ECharT, _Traits, _Alloc>;
_LIBCPP_HIDE_FROM_ABI static _ECharT const* __range_begin(_Str const& __s) { return __s.data(); }
@@ -117,7 +117,7 @@ template <class _ECharT, class _Traits>
struct __is_pathable_string< basic_string_view<_ECharT, _Traits>,
_Void<typename __can_convert_char<_ECharT>::__char_type> >
: public __can_convert_char<_ECharT> {
- using _Str = basic_string_view<_ECharT, _Traits>;
+ using _Str [[__gnu__::__nodebug__]] = basic_string_view<_ECharT, _Traits>;
_LIBCPP_HIDE_FROM_ABI static _ECharT const* __range_begin(_Str const& __s) { return __s.data(); }
@@ -157,7 +157,7 @@ struct __is_pathable_iter<
true,
_Void<typename __can_convert_char< typename iterator_traits<_Iter>::value_type>::__char_type> >
: __can_convert_char<typename iterator_traits<_Iter>::value_type> {
- using _ECharT = typename iterator_traits<_Iter>::value_type;
+ using _ECharT [[__gnu__::__nodebug__]] = typename iterator_traits<_Iter>::value_type;
_LIBCPP_HIDE_FROM_ABI static _Iter __range_begin(_Iter __b) { return __b; }
@@ -380,13 +380,13 @@ struct _PathExport<char8_t> {
class _LIBCPP_EXPORTED_FROM_ABI path {
template <class _SourceOrIter, class _Tp = path&>
- using _EnableIfPathable = __enable_if_t<__is_pathable<_SourceOrIter>::value, _Tp>;
+ using _EnableIfPathable [[__gnu__::__nodebug__]] = __enable_if_t<__is_pathable<_SourceOrIter>::value, _Tp>;
template <class _Tp>
- using _SourceChar = typename __is_pathable<_Tp>::__char_type;
+ using _SourceChar [[__gnu__::__nodebug__]] = typename __is_pathable<_Tp>::__char_type;
template <class _Tp>
- using _SourceCVT = _PathCVT<_SourceChar<_Tp> >;
+ using _SourceCVT [[__gnu__::__nodebug__]] = _PathCVT<_SourceChar<_Tp> >;
public:
# if defined(_LIBCPP_WIN32API)
diff --git a/libcxx/include/__flat_map/flat_map.h b/libcxx/include/__flat_map/flat_map.h
index 58b362ad7a706f..3a64bdde5f1cc1 100644
--- a/libcxx/include/__flat_map/flat_map.h
+++ b/libcxx/include/__flat_map/flat_map.h
@@ -137,9 +137,10 @@ class flat_map {
template <bool _Const>
struct __iterator {
private:
- using __key_iterator = ranges::iterator_t<const key_container_type>;
- using __mapped_iterator = ranges::iterator_t<__maybe_const<_Const, mapped_container_type>>;
- using __reference = pair<iter_reference_t<__key_iterator>, iter_reference_t<__mapped_iterator>>;
+ using __key_iterator [[__gnu__::__nodebug__]] = ranges::iterator_t<const key_container_type>;
+ using __mapped_iterator [[__gnu__::__nodebug__]] = ranges::iterator_t<__maybe_const<_Const, mapped_container_type>>;
+ using __reference [[__gnu__::__nodebug__]] =
+ pair<iter_reference_t<__key_iterator>, iter_reference_t<__mapped_iterator>>;
struct __arrow_proxy {
__reference __ref_;
diff --git a/libcxx/include/__format/buffer.h b/libcxx/include/__format/buffer.h
index 618b8ef0256432..5818c4fe0676bd 100644
--- a/libcxx/include/__format/buffer.h
+++ b/libcxx/include/__format/buffer.h
@@ -322,7 +322,7 @@ struct _LIBCPP_TEMPLATE_VIS __back_insert_iterator_container<back_insert_iterato
template <class _Container>
class _LIBCPP_TEMPLATE_VIS __writer_container {
public:
- using _CharT = typename _Container::value_type;
+ using _CharT [[__gnu__::__nodebug__]] = typename _Container::value_type;
_LIBCPP_HIDE_FROM_ABI explicit __writer_container(back_insert_iterator<_Container> __out_it)
: __container_{__out_it.__get_container()} {}
@@ -340,7 +340,7 @@ class _LIBCPP_TEMPLATE_VIS __writer_container {
/// Selects the type of the writer used for the output iterator.
template <class _OutIt, class _CharT>
class _LIBCPP_TEMPLATE_VIS __writer_selector {
- using _Container = typename __back_insert_iterator_container<_OutIt>::type;
+ using _Container [[__gnu__::__nodebug__]] = typename __back_insert_iterator_container<_OutIt>::type;
public:
using type =
@@ -355,7 +355,7 @@ class _LIBCPP_TEMPLATE_VIS __writer_selector {
template <class _OutIt, __fmt_char_type _CharT>
requires(output_iterator<_OutIt, const _CharT&>)
class _LIBCPP_TEMPLATE_VIS __format_buffer {
- using _Storage =
+ using _Storage [[__gnu__::__nodebug__]] =
conditional_t<__enable_direct_output<_OutIt, _CharT>, __direct_storage<_CharT>, __internal_storage<_CharT>>;
public:
@@ -408,7 +408,7 @@ class _LIBCPP_TEMPLATE_VIS __formatted_size_buffer {
template <class _OutIt, __fmt_char_type _CharT, bool>
requires(output_iterator<_OutIt, const _CharT&>)
struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base {
- using _Size = iter_difference_t<_OutIt>;
+ using _Size [[__gnu__::__nodebug__]] = iter_difference_t<_OutIt>;
public:
_LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __max_size)
@@ -438,7 +438,7 @@ struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base {
template <class _OutIt, __fmt_char_type _CharT>
requires(output_iterator<_OutIt, const _CharT&>)
class _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base<_OutIt, _CharT, true> {
- using _Size = iter_difference_t<_OutIt>;
+ using _Size [[__gnu__::__nodebug__]] = iter_difference_t<_OutIt>;
public:
_LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __max_size)
@@ -489,8 +489,9 @@ template <class _OutIt, __fmt_char_type _CharT>
requires(output_iterator<_OutIt, const _CharT&>)
struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer final
: public __format_to_n_buffer_base< _OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>> {
- using _Base = __format_to_n_buffer_base<_OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>>;
- using _Size = iter_difference_t<_OutIt>;
+ using _Base [[__gnu__::__nodebug__]] =
+ __format_to_n_buffer_base<_OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>>;
+ using _Size [[__gnu__::__nodebug__]] = iter_difference_t<_OutIt>;
public:
_LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer(_OutIt __out_it, _Size __max_size)
@@ -523,7 +524,7 @@ struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer final
// would lead to a circular include with formatter for vector<bool>.
template <__fmt_char_type _CharT>
class _LIBCPP_TEMPLATE_VIS __retarget_buffer {
- using _Alloc = allocator<_CharT>;
+ using _Alloc [[__gnu__::__nodebug__]] = allocator<_CharT>;
public:
using value_type = _CharT;
diff --git a/libcxx/include/__format/concepts.h b/libcxx/include/__format/concepts.h
index 2c40e3e3149171..5683d48dab4aaf 100644
--- a/libcxx/include/__format/concepts.h
+++ b/libcxx/include/__format/concepts.h
@@ -44,7 +44,7 @@ concept __fmt_char_type =
// (Note testing for (w)format_context would be a valid choice, but requires
// selecting the proper one depending on the type of _CharT.)
template <class _CharT>
-using __fmt_iter_for = _CharT*;
+using __fmt_iter_for [[__gnu__::__nodebug__]] = _CharT*;
template <class _Tp, class _Context, class _Formatter = typename _Context::template formatter_type<remove_const_t<_Tp>>>
concept __formattable_with =
diff --git a/libcxx/include/__format/container_adaptor.h b/libcxx/include/__format/container_adaptor.h
index d3be2e18956046..21a99294dc9039 100644
--- a/libcxx/include/__format/container_adaptor.h
+++ b/libcxx/include/__format/container_adaptor.h
@@ -37,8 +37,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Adaptor, class _CharT>
struct _LIBCPP_TEMPLATE_VIS __formatter_container_adaptor {
private:
- using __maybe_const_container = __fmt_maybe_const<typename _Adaptor::container_type, _CharT>;
- using __maybe_const_adaptor = __maybe_const<is_const_v<__maybe_const_container>, _Adaptor>;
+ using __maybe_const_container [[__gnu__::__nodebug__]] = __fmt_maybe_const<typename _Adaptor::container_type, _CharT>;
+ using __maybe_const_adaptor [[__gnu__::__nodebug__]] = __maybe_const<is_const_v<__maybe_const_container>, _Adaptor>;
formatter<ranges::ref_view<__maybe_const_container>, _CharT> __underlying_;
public:
diff --git a/libcxx/include/__format/format_arg.h b/libcxx/include/__format/format_arg.h
index a973ccd43c4207..9029fd07710290 100644
--- a/libcxx/include/__format/format_arg.h
+++ b/libcxx/include/__format/format_arg.h
@@ -208,7 +208,7 @@ _LIBCPP_HIDE_FROM_ABI _Rp __visit_format_arg(_Visitor&& __vis, basic_format_arg<
/// separate arrays.
template <class _Context>
class __basic_format_arg_value {
- using _CharT = typename _Context::char_type;
+ using _CharT [[__gnu__::__nodebug__]] = typename _Context::char_type;
public:
/// Contains the implementation for basic_format_arg::handle.
diff --git a/libcxx/include/__format/format_arg_store.h b/libcxx/include/__format/format_arg_store.h
index 8b2c95c657c9bd..e89af500e46301 100644
--- a/libcxx/include/__format/format_arg_store.h
+++ b/libcxx/include/__format/format_arg_store.h
@@ -257,7 +257,7 @@ struct _LIBCPP_TEMPLATE_VIS __format_arg_store {
}
}
- using _Storage =
+ using _Storage [[__gnu__::__nodebug__]] =
conditional_t<__format::__use_packed_format_arg_store(sizeof...(_Args)),
__format::__packed_format_arg_store<_Context, sizeof...(_Args)>,
__format::__unpacked_format_arg_store<_Context, sizeof...(_Args)>>;
diff --git a/libcxx/include/__format/format_functions.h b/libcxx/include/__format/format_functions.h
index 3991363c0124e8..ce88811d71dc89 100644
--- a/libcxx/include/__format/format_functions.h
+++ b/libcxx/include/__format/format_functions.h
@@ -379,7 +379,7 @@ struct _LIBCPP_TEMPLATE_VIS basic_format_string {
private:
basic_string_view<_CharT> __str_;
- using _Context = __format::__compile_time_basic_format_context<_CharT>;
+ using _Context [[__gnu__::__nodebug__]] = __format::__compile_time_basic_format_context<_CharT>;
static constexpr array<__format::__arg_t, sizeof...(_Args)> __types_{
__format::__determine_arg_t<_Context, remove_cvref_t<_Args>>()...};
diff --git a/libcxx/include/__format/formatter_floating_point.h b/libcxx/include/__format/formatter_floating_point.h
index e04fffb683c3a6..8493c6ef89234a 100644
--- a/libcxx/include/__format/formatter_floating_point.h
+++ b/libcxx/include/__format/formatter_floating_point.h
@@ -141,7 +141,7 @@ struct __traits<double> {
/// on the stack or the heap.
template <floating_point _Fp>
class _LIBCPP_TEMPLATE_VIS __float_buffer {
- using _Traits = __traits<_Fp>;
+ using _Traits [[__gnu__::__nodebug__]] = __traits<_Fp>;
public:
// TODO FMT Improve this constructor to do a better estimate.
diff --git a/libcxx/include/__format/formatter_string.h b/libcxx/include/__format/formatter_string.h
index 826d6421c8631e..17e69087fd9be6 100644
--- a/libcxx/include/__format/formatter_string.h
+++ b/libcxx/include/__format/formatter_string.h
@@ -59,7 +59,7 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_string {
// Formatter const char*.
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<const _CharT*, _CharT> : public __formatter_string<_CharT> {
- using _Base = __formatter_string<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_string<_CharT>;
template <class _FormatContext>
_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator format(const _CharT* __str, _FormatContext& __ctx) const {
@@ -78,7 +78,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<const _CharT*, _CharT> : public __formatte
// Formatter char*.
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<_CharT*, _CharT> : public formatter<const _CharT*, _CharT> {
- using _Base = formatter<const _CharT*, _CharT>;
+ using _Base [[__gnu__::__nodebug__]] = formatter<const _CharT*, _CharT>;
template <class _FormatContext>
_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator format(_CharT* __str, _FormatContext& __ctx) const {
@@ -89,7 +89,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<_CharT*, _CharT> : public formatter<const
// Formatter char[].
template <__fmt_char_type _CharT, size_t _Size>
struct _LIBCPP_TEMPLATE_VIS formatter<_CharT[_Size], _CharT> : public __formatter_string<_CharT> {
- using _Base = __formatter_string<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_string<_CharT>;
template <class _FormatContext>
_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
@@ -102,7 +102,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<_CharT[_Size], _CharT> : public __formatte
template <__fmt_char_type _CharT, class _Traits, class _Allocator>
struct _LIBCPP_TEMPLATE_VIS formatter<basic_string<_CharT, _Traits, _Allocator>, _CharT>
: public __formatter_string<_CharT> {
- using _Base = __formatter_string<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_string<_CharT>;
template <class _FormatContext>
_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
@@ -115,7 +115,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<basic_string<_CharT, _Traits, _Allocator>,
// Formatter std::string_view.
template <__fmt_char_type _CharT, class _Traits>
struct _LIBCPP_TEMPLATE_VIS formatter<basic_string_view<_CharT, _Traits>, _CharT> : public __formatter_string<_CharT> {
- using _Base = __formatter_string<_CharT>;
+ using _Base [[__gnu__::__nodebug__]] = __formatter_string<_CharT>;
template <class _FormatContext>
_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
diff --git a/libcxx/include/__format/range_default_formatter.h b/libcxx/include/__format/range_default_formatter.h
index fb21b0f8beb3a1..c0f487d4f5a291 100644
--- a/libcxx/include/__format/range_default_formatter.h
+++ b/libcxx/include/__format/range_default_formatter.h
@@ -40,7 +40,8 @@ concept __const_formattable_range =
ranges::input_range<const _Rp> && formattable<ranges::range_reference_t<const _Rp>, _CharT>;
template <class _Rp, class _CharT>
-using __fmt_maybe_const = conditional_t<__const_formattable_range<_Rp, _CharT>, const _Rp, _Rp>;
+using __fmt_maybe_const [[__gnu__::__nodebug__]] =
+ conditional_t<__const_formattable_range<_Rp, _CharT>, const _Rp, _Rp>;
_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wshadow")
@@ -95,7 +96,7 @@ struct _LIBCPP_TEMPLATE_VIS __range_default_formatter;
template <ranges::input_range _Rp, class _CharT>
struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<range_format::sequence, _Rp, _CharT> {
private:
- using __maybe_const_r = __fmt_maybe_const<_Rp, _CharT>;
+ using __maybe_const_r [[__gnu__::__nodebug__]] = __fmt_maybe_const<_Rp, _CharT>;
range_formatter<remove_cvref_t<ranges::range_reference_t<__maybe_const_r>>, _CharT> __underlying_;
public:
@@ -122,8 +123,8 @@ struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<range_format::sequence, _R
template <ranges::input_range _Rp, class _CharT>
struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<range_format::map, _Rp, _CharT> {
private:
- using __maybe_const_map = __fmt_maybe_const<_Rp, _CharT>;
- using __element_type = remove_cvref_t<ranges::range_reference_t<__maybe_const_map>>;
+ using __maybe_const_map [[__gnu__::__nodebug__]] = __fmt_maybe_const<_Rp, _CharT>;
+ using __element_type [[__gnu__::__nodebug__]] = remove_cvref_t<ranges::range_reference_t<__maybe_const_map>>;
range_formatter<__element_type, _CharT> __underlying_;
public:
@@ -150,8 +151,8 @@ struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<range_format::map, _Rp, _C
template <ranges::input_range _Rp, class _CharT>
struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<range_format::set, _Rp, _CharT> {
private:
- using __maybe_const_set = __fmt_maybe_const<_Rp, _CharT>;
- using __element_type = remove_cvref_t<ranges::range_reference_t<__maybe_const_set>>;
+ using __maybe_const_set [[__gnu__::__nodebug__]] = __fmt_maybe_const<_Rp, _CharT>;
+ using __element_type [[__gnu__::__nodebug__]] = remove_cvref_t<ranges::range_reference_t<__maybe_const_set>>;
range_formatter<__element_type, _CharT> __underlying_;
public:
diff --git a/libcxx/include/__format/unicode.h b/libcxx/include/__format/unicode.h
index b4f22c739d6a12..8739b502e3dffb 100644
--- a/libcxx/include/__format/unicode.h
+++ b/libcxx/include/__format/unicode.h
@@ -123,7 +123,7 @@ class __code_point_view;
/// UTF-8 specialization.
template <>
class __code_point_view<char> {
- using _Iterator = basic_string_view<char>::const_iterator;
+ using _Iterator [[__gnu__::__nodebug__]] = basic_string_view<char>::const_iterator;
public:
_LIBCPP_HIDE_FROM_ABI constexpr explicit __code_point_view(_Iterator __first, _Iterator __last)
@@ -249,7 +249,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __is_surrogate_pair_low(wchar_t __value) {
/// - 4 UTF-32 (for example Linux)
template <>
class __code_point_view<wchar_t> {
- using _Iterator = typename basic_string_view<wchar_t>::const_iterator;
+ using _Iterator [[__gnu__::__nodebug__]] = typename basic_string_view<wchar_t>::const_iterator;
public:
static_assert(sizeof(wchar_t) == 2 || sizeof(wchar_t) == 4, "sizeof(wchar_t) has a not implemented value");
@@ -300,8 +300,8 @@ class __code_point_view<wchar_t> {
// This implements the extended rules see
// https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries
class __extended_grapheme_cluster_break {
- using __EGC_property = __extended_grapheme_custer_property_boundary::__property;
- using __inCB_property = __indic_conjunct_break::__property;
+ using __EGC_property [[__gnu__::__nodebug__]] = __extended_grapheme_custer_property_boundary::__property;
+ using __inCB_property [[__gnu__::__nodebug__]] = __indic_conjunct_break::__property;
public:
_LIBCPP_HIDE_FROM_ABI constexpr explicit __extended_grapheme_cluster_break(char32_t __first_code_point)
@@ -527,7 +527,7 @@ class __extended_grapheme_cluster_break {
/// Therefore only this code point is extracted.
template <class _CharT>
class __extended_grapheme_cluster_view {
- using _Iterator = typename basic_string_view<_CharT>::const_iterator;
+ using _Iterator [[__gnu__::__nodebug__]] = typename basic_string_view<_CharT>::const_iterator;
public:
_LIBCPP_HIDE_FROM_ABI constexpr explicit __extended_grapheme_cluster_view(_Iterator __first, _Iterator __last)
diff --git a/libcxx/include/__functional/binary_function.h b/libcxx/include/__functional/binary_function.h
index ddee3b170311f0..22dddf2cb02067 100644
--- a/libcxx/include/__functional/binary_function.h
+++ b/libcxx/include/__functional/binary_function.h
@@ -42,11 +42,11 @@ struct __binary_function_keep_layout_base {
_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
template <class _Arg1, class _Arg2, class _Result>
-using __binary_function = binary_function<_Arg1, _Arg2, _Result>;
+using __binary_function [[__gnu__::__nodebug__]] = binary_function<_Arg1, _Arg2, _Result>;
_LIBCPP_DIAGNOSTIC_POP
#else
template <class _Arg1, class _Arg2, class _Result>
-using __binary_function = __binary_function_keep_layout_base<_Arg1, _Arg2, _Result>;
+using __binary_function [[__gnu__::__nodebug__]] = __binary_function_keep_layout_base<_Arg1, _Arg2, _Result>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h
index f82c1517249b16..5bf0b8200da7cd 100644
--- a/libcxx/include/__functional/bind.h
+++ b/libcxx/include/__functional/bind.h
@@ -198,7 +198,7 @@ __apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>, _
template <class _Fp, class... _BoundArgs>
class __bind : public __weak_result_type<__decay_t<_Fp> > {
protected:
- using _Fd = __decay_t<_Fp>;
+ using _Fd [[__gnu__::__nodebug__]] = __decay_t<_Fp>;
typedef tuple<__decay_t<_BoundArgs>...> _Td;
private:
diff --git a/libcxx/include/__functional/boyer_moore_searcher.h b/libcxx/include/__functional/boyer_moore_searcher.h
index 52a58d57a8d40a..4ab35c45769d1e 100644
--- a/libcxx/include/__functional/boyer_moore_searcher.h
+++ b/libcxx/include/__functional/boyer_moore_searcher.h
@@ -92,7 +92,7 @@ class _LIBCPP_TEMPLATE_VIS boyer_moore_searcher {
private:
using difference_type = typename std::iterator_traits<_RandomAccessIterator1>::difference_type;
using value_type = typename std::iterator_traits<_RandomAccessIterator1>::value_type;
- using __skip_table_type =
+ using __skip_table_type [[__gnu__::__nodebug__]] =
_BMSkipTable<value_type,
difference_type,
_Hash,
@@ -223,7 +223,7 @@ class _LIBCPP_TEMPLATE_VIS boyer_moore_horspool_searcher {
private:
using difference_type = typename iterator_traits<_RandomAccessIterator1>::difference_type;
using value_type = typename iterator_traits<_RandomAccessIterator1>::value_type;
- using __skip_table_type =
+ using __skip_table_type [[__gnu__::__nodebug__]] =
_BMSkipTable<value_type,
difference_type,
_Hash,
diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h
index 543be05f10f330..fb4190d9742f39 100644
--- a/libcxx/include/__functional/function.h
+++ b/libcxx/include/__functional/function.h
@@ -577,7 +577,7 @@ struct __policy {
// Used to choose between perfect forwarding or pass-by-value. Pass-by-value is
// faster for types that can be passed in registers.
template <typename _Tp>
-using __fast_forward = __conditional_t<is_scalar<_Tp>::value, _Tp, _Tp&&>;
+using __fast_forward [[__gnu__::__nodebug__]] = __conditional_t<is_scalar<_Tp>::value, _Tp, _Tp&&>;
// __policy_invoker calls an instance of __alloc_func held in __policy_storage.
@@ -848,7 +848,7 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
};
template <class _Fp>
- using _EnableIfLValueCallable = __enable_if_t<__callable<_Fp&>::value>;
+ using _EnableIfLValueCallable [[__gnu__::__nodebug__]] = __enable_if_t<__callable<_Fp&>::value>;
public:
typedef _Rp result_type;
diff --git a/libcxx/include/__functional/perfect_forward.h b/libcxx/include/__functional/perfect_forward.h
index 8fd68db3d6eb84..c83f2ab8435610 100644
--- a/libcxx/include/__functional/perfect_forward.h
+++ b/libcxx/include/__functional/perfect_forward.h
@@ -94,7 +94,7 @@ struct __perfect_forward_impl<_Op, index_sequence<_Idx...>, _BoundArgs...> {
// __perfect_forward implements a perfect-forwarding call wrapper as explained in [func.require].
template <class _Op, class... _Args>
-using __perfect_forward = __perfect_forward_impl<_Op, index_sequence_for<_Args...>, _Args...>;
+using __perfect_forward [[__gnu__::__nodebug__]] = __perfect_forward_impl<_Op, index_sequence_for<_Args...>, _Args...>;
#endif // _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__functional/unary_function.h b/libcxx/include/__functional/unary_function.h
index 69b1bc94220ae6..c2a446a7351a90 100644
--- a/libcxx/include/__functional/unary_function.h
+++ b/libcxx/include/__functional/unary_function.h
@@ -43,7 +43,7 @@ using __unary_function = unary_function<_Arg, _Result>;
_LIBCPP_DIAGNOSTIC_POP
#else
template <class _Arg, class _Result>
-using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
+using __unary_function [[__gnu__::__nodebug__]] = __unary_function_keep_layout_base<_Arg, _Result>;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table
index a0c72f4c205413..cece70e688344c 100644
--- a/libcxx/include/__hash_table
+++ b/libcxx/include/__hash_table
@@ -113,8 +113,8 @@ struct __hash_node_base {
template <class _Tp, class _VoidPtr>
struct __hash_node : public __hash_node_base< __rebind_pointer_t<_VoidPtr, __hash_node<_Tp, _VoidPtr> > > {
typedef _Tp __node_value_type;
- using _Base = __hash_node_base<__rebind_pointer_t<_VoidPtr, __hash_node<_Tp, _VoidPtr> > >;
- using __next_pointer = typename _Base::__next_pointer;
+ using _Base [[__gnu__::__nodebug__]] = __hash_node_base<__rebind_pointer_t<_VoidPtr, __hash_node<_Tp, _VoidPtr> > >;
+ using __next_pointer [[__gnu__::__nodebug__]] = typename _Base::__next_pointer;
size_t __hash_;
diff --git a/libcxx/include/__iterator/aliasing_iterator.h b/libcxx/include/__iterator/aliasing_iterator.h
index aeb5b4a88ec375..da68569f8752ba 100644
--- a/libcxx/include/__iterator/aliasing_iterator.h
+++ b/libcxx/include/__iterator/aliasing_iterator.h
@@ -31,8 +31,8 @@ struct __aliasing_iterator_wrapper {
class __iterator {
_BaseIter __base_ = nullptr;
- using __iter_traits = iterator_traits<_BaseIter>;
- using __base_value_type = typename __iter_traits::value_type;
+ using __iter_traits [[__gnu__::__nodebug__]] = iterator_traits<_BaseIter>;
+ using __base_value_type [[__gnu__::__nodebug__]] = typename __iter_traits::value_type;
static_assert(__has_random_access_iterator_category<_BaseIter>::value,
"The base iterator has to be a random access iterator!");
@@ -120,7 +120,7 @@ struct __aliasing_iterator_wrapper {
// This is required to avoid ADL instantiations on _BaseT
template <class _BaseT, class _Alias>
-using __aliasing_iterator = typename __aliasing_iterator_wrapper<_BaseT, _Alias>::__iterator;
+using __aliasing_iterator [[__gnu__::__nodebug__]] = typename __aliasing_iterator_wrapper<_BaseT, _Alias>::__iterator;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__iterator/concepts.h b/libcxx/include/__iterator/concepts.h
index 1c227933a482a1..20ea9180024788 100644
--- a/libcxx/include/__iterator/concepts.h
+++ b/libcxx/include/__iterator/concepts.h
@@ -67,10 +67,10 @@ template <class _In>
concept indirectly_readable = __indirectly_readable_impl<remove_cvref_t<_In>>;
template <class _Tp>
-using __projected_iterator_t = typename _Tp::__projected_iterator;
+using __projected_iterator_t [[__gnu__::__nodebug__]] = typename _Tp::__projected_iterator;
template <class _Tp>
-using __projected_projection_t = typename _Tp::__projected_projection;
+using __projected_projection_t [[__gnu__::__nodebug__]] = typename _Tp::__projected_projection;
template <class _Tp>
concept __specialization_of_projected = requires {
@@ -89,7 +89,7 @@ struct __indirect_value_t_impl<_Tp> {
};
template <indirectly_readable _Tp>
-using __indirect_value_t = typename __indirect_value_t_impl<_Tp>::type;
+using __indirect_value_t [[__gnu__::__nodebug__]] = typename __indirect_value_t_impl<_Tp>::type;
template <indirectly_readable _Tp>
using iter_common_reference_t = common_reference_t<iter_reference_t<_Tp>, __indirect_value_t<_Tp>>;
@@ -274,7 +274,7 @@ concept indirectly_copyable_storable =
#endif // _LIBCPP_STD_VER >= 20
template <class _Tp>
-using __has_random_access_iterator_category_or_concept
+using __has_random_access_iterator_category_or_concept [[__gnu__::__nodebug__]]
#if _LIBCPP_STD_VER >= 20
= integral_constant<bool, random_access_iterator<_Tp>>;
#else // _LIBCPP_STD_VER < 20
diff --git a/libcxx/include/__iterator/insert_iterator.h b/libcxx/include/__iterator/insert_iterator.h
index b3311042014f8f..8b08ee48b517d9 100644
--- a/libcxx/include/__iterator/insert_iterator.h
+++ b/libcxx/include/__iterator/insert_iterator.h
@@ -29,10 +29,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
template <class _Container>
-using __insert_iterator_iter_t = ranges::iterator_t<_Container>;
+using __insert_iterator_iter_t [[__gnu__::__nodebug__]] = ranges::iterator_t<_Container>;
#else
template <class _Container>
-using __insert_iterator_iter_t = typename _Container::iterator;
+using __insert_iterator_iter_t [[__gnu__::__nodebug__]] = typename _Container::iterator;
#endif
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
diff --git a/libcxx/include/__iterator/iterator_traits.h b/libcxx/include/__iterator/iterator_traits.h
index eb6ba8b62fb30f..30d011c3d965c7 100644
--- a/libcxx/include/__iterator/iterator_traits.h
+++ b/libcxx/include/__iterator/iterator_traits.h
@@ -47,7 +47,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
template <class _Tp>
-using __with_reference = _Tp&;
+using __with_reference [[__gnu__::__nodebug__]] = _Tp&;
template <class _Tp>
concept __can_reference = requires { typename __with_reference<_Tp>; };
@@ -80,19 +80,20 @@ struct __iter_traits_cache {
using type = _If< __is_primary_template<iterator_traits<_Iter> >::value, _Iter, iterator_traits<_Iter> >;
};
template <class _Iter>
-using _ITER_TRAITS = typename __iter_traits_cache<_Iter>::type;
+using _ITER_TRAITS [[__gnu__::__nodebug__]] = typename __iter_traits_cache<_Iter>::type;
struct __iter_concept_concept_test {
template <class _Iter>
- using _Apply = typename _ITER_TRAITS<_Iter>::iterator_concept;
+ using _Apply [[__gnu__::__nodebug__]] = typename _ITER_TRAITS<_Iter>::iterator_concept;
};
struct __iter_concept_category_test {
template <class _Iter>
- using _Apply = typename _ITER_TRAITS<_Iter>::iterator_category;
+ using _Apply [[__gnu__::__nodebug__]] = typename _ITER_TRAITS<_Iter>::iterator_category;
};
struct __iter_concept_random_fallback {
template <class _Iter>
- using _Apply = __enable_if_t< __is_primary_template<iterator_traits<_Iter> >::value, random_access_iterator_tag >;
+ using _Apply [[__gnu__::__nodebug__]] =
+ __enable_if_t<__is_primary_template<iterator_traits<_Iter> >::value, random_access_iterator_tag>;
};
template <class _Iter, class _Tester>
@@ -106,7 +107,7 @@ struct __iter_concept_cache {
};
template <class _Iter>
-using _ITER_CONCEPT = typename __iter_concept_cache<_Iter>::type::template _Apply<_Iter>;
+using _ITER_CONCEPT [[__gnu__::__nodebug__]] = typename __iter_concept_cache<_Iter>::type::template _Apply<_Iter>;
template <class _Tp>
struct __has_iterator_typedefs {
@@ -167,7 +168,7 @@ concept __cpp17_input_iterator = __cpp17_iterator<_Ip> && equality_comparable<_I
typename incrementable_traits<_Ip>::difference_type;
typename indirectly_readable_traits<_Ip>::value_type;
typename common_reference_t<iter_reference_t<_Ip>&&, typename indirectly_readable_traits<_Ip>::value_type&>;
- typename common_reference_t<decltype(*__i++)&&, typename indirectly_readable_traits<_Ip>::value_type&>;
+ typename common_reference_t<decltype(*__i++) &&, typename indirectly_readable_traits<_Ip>::value_type&>;
requires signed_integral<typename incrementable_traits<_Ip>::difference_type>;
};
@@ -364,7 +365,7 @@ struct __iterator_traits<_Ip> {
template <class _Ip>
struct iterator_traits : __iterator_traits<_Ip> {
- using __primary_template = iterator_traits;
+ using __primary_template [[__gnu__::__nodebug__]] = iterator_traits;
};
#else // _LIBCPP_STD_VER >= 20
@@ -430,16 +431,20 @@ template <class _Tp, class _Up>
struct __has_iterator_concept_convertible_to<_Tp, _Up, false> : false_type {};
template <class _Tp>
-using __has_input_iterator_category = __has_iterator_category_convertible_to<_Tp, input_iterator_tag>;
+using __has_input_iterator_category [[__gnu__::__nodebug__]] =
+ __has_iterator_category_convertible_to<_Tp, input_iterator_tag>;
template <class _Tp>
-using __has_forward_iterator_category = __has_iterator_category_convertible_to<_Tp, forward_iterator_tag>;
+using __has_forward_iterator_category [[__gnu__::__nodebug__]] =
+ __has_iterator_category_convertible_to<_Tp, forward_iterator_tag>;
template <class _Tp>
-using __has_bidirectional_iterator_category = __has_iterator_category_convertible_to<_Tp, bidirectional_iterator_tag>;
+using __has_bidirectional_iterator_category [[__gnu__::__nodebug__]] =
+ __has_iterator_category_convertible_to<_Tp, bidirectional_iterator_tag>;
template <class _Tp>
-using __has_random_access_iterator_category = __has_iterator_category_convertible_to<_Tp, random_access_iterator_tag>;
+using __has_random_access_iterator_category [[__gnu__::__nodebug__]] =
+ __has_iterator_category_convertible_to<_Tp, random_access_iterator_tag>;
// __libcpp_is_contiguous_iterator determines if an iterator is known by
// libc++ to be contiguous, either because it advertises itself as such
@@ -466,48 +471,49 @@ template <class _Iter>
class __wrap_iter;
template <class _Tp>
-using __has_exactly_input_iterator_category =
+using __has_exactly_input_iterator_category [[__gnu__::__nodebug__]] =
integral_constant<bool,
__has_iterator_category_convertible_to<_Tp, input_iterator_tag>::value &&
!__has_iterator_category_convertible_to<_Tp, forward_iterator_tag>::value>;
template <class _Tp>
-using __has_exactly_forward_iterator_category =
+using __has_exactly_forward_iterator_category [[__gnu__::__nodebug__]] =
integral_constant<bool,
__has_iterator_category_convertible_to<_Tp, forward_iterator_tag>::value &&
!__has_iterator_category_convertible_to<_Tp, bidirectional_iterator_tag>::value>;
template <class _Tp>
-using __has_exactly_bidirectional_iterator_category =
+using __has_exactly_bidirectional_iterator_category [[__gnu__::__nodebug__]] =
integral_constant<bool,
__has_iterator_category_convertible_to<_Tp, bidirectional_iterator_tag>::value &&
!__has_iterator_category_convertible_to<_Tp, random_access_iterator_tag>::value>;
template <class _InputIterator>
-using __iter_value_type = typename iterator_traits<_InputIterator>::value_type;
+using __iter_value_type [[__gnu__::__nodebug__]] = typename iterator_traits<_InputIterator>::value_type;
template <class _InputIterator>
-using __iter_key_type = __remove_const_t<typename iterator_traits<_InputIterator>::value_type::first_type>;
+using __iter_key_type [[__gnu__::__nodebug__]] =
+ __remove_const_t<typename iterator_traits<_InputIterator>::value_type::first_type>;
template <class _InputIterator>
-using __iter_mapped_type = typename iterator_traits<_InputIterator>::value_type::second_type;
+using __iter_mapped_type [[__gnu__::__nodebug__]] = typename iterator_traits<_InputIterator>::value_type::second_type;
template <class _InputIterator>
-using __iter_to_alloc_type =
+using __iter_to_alloc_type [[__gnu__::__nodebug__]] =
pair<const typename iterator_traits<_InputIterator>::value_type::first_type,
typename iterator_traits<_InputIterator>::value_type::second_type>;
template <class _Iter>
-using __iterator_category_type = typename iterator_traits<_Iter>::iterator_category;
+using __iterator_category_type [[__gnu__::__nodebug__]] = typename iterator_traits<_Iter>::iterator_category;
template <class _Iter>
-using __iterator_pointer_type = typename iterator_traits<_Iter>::pointer;
+using __iterator_pointer_type [[__gnu__::__nodebug__]] = typename iterator_traits<_Iter>::pointer;
template <class _Iter>
-using __iter_diff_t = typename iterator_traits<_Iter>::difference_type;
+using __iter_diff_t [[__gnu__::__nodebug__]] = typename iterator_traits<_Iter>::difference_type;
template <class _Iter>
-using __iter_reference = typename iterator_traits<_Iter>::reference;
+using __iter_reference [[__gnu__::__nodebug__]] = typename iterator_traits<_Iter>::reference;
#if _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__iterator/projected.h b/libcxx/include/__iterator/projected.h
index 1c560ec0550011..cdac137031cf7e 100644
--- a/libcxx/include/__iterator/projected.h
+++ b/libcxx/include/__iterator/projected.h
@@ -26,9 +26,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _It, class _Proj>
struct __projected_impl {
struct __type {
- using __primary_template = __type;
- using __projected_iterator = _It;
- using __projected_projection = _Proj;
+ using __primary_template [[__gnu__::__nodebug__]] = __type;
+ using __projected_iterator [[__gnu__::__nodebug__]] = _It;
+ using __projected_projection [[__gnu__::__nodebug__]] = _Proj;
using value_type = remove_cvref_t<indirect_result_t<_Proj&, _It>>;
indirect_result_t<_Proj&, _It> operator*() const; // not defined
@@ -38,9 +38,9 @@ struct __projected_impl {
template <weakly_incrementable _It, class _Proj>
struct __projected_impl<_It, _Proj> {
struct __type {
- using __primary_template = __type;
- using __projected_iterator = _It;
- using __projected_projection = _Proj;
+ using __primary_template [[__gnu__::__nodebug__]] = __type;
+ using __projected_iterator [[__gnu__::__nodebug__]] = _It;
+ using __projected_projection [[__gnu__::__nodebug__]] = _Proj;
using value_type = remove_cvref_t<indirect_result_t<_Proj&, _It>>;
using difference_type = iter_difference_t<_It>;
diff --git a/libcxx/include/__iterator/ranges_iterator_traits.h b/libcxx/include/__iterator/ranges_iterator_traits.h
index 859e7082048ac1..061495d76beebb 100644
--- a/libcxx/include/__iterator/ranges_iterator_traits.h
+++ b/libcxx/include/__iterator/ranges_iterator_traits.h
@@ -24,13 +24,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 23
template <ranges::input_range _Range>
-using __range_key_type = __remove_const_t<typename ranges::range_value_t<_Range>::first_type>;
+using __range_key_type [[__gnu__::__nodebug__]] = __remove_const_t<typename ranges::range_value_t<_Range>::first_type>;
template <ranges::input_range _Range>
-using __range_mapped_type = typename ranges::range_value_t<_Range>::second_type;
+using __range_mapped_type [[__gnu__::__nodebug__]] = typename ranges::range_value_t<_Range>::second_type;
template <ranges::input_range _Range>
-using __range_to_alloc_type =
+using __range_to_alloc_type [[__gnu__::__nodebug__]] =
pair<const typename ranges::range_value_t<_Range>::first_type, typename ranges::range_value_t<_Range>::second_type>;
#endif
diff --git a/libcxx/include/__iterator/reverse_iterator.h b/libcxx/include/__iterator/reverse_iterator.h
index 5e88d86ad5e9b2..74e9f761b21d3d 100644
--- a/libcxx/include/__iterator/reverse_iterator.h
+++ b/libcxx/include/__iterator/reverse_iterator.h
@@ -329,8 +329,8 @@ __reverse_range(_Range&& __range) {
template <class _Iter, bool __b>
struct __unwrap_iter_impl<reverse_iterator<reverse_iterator<_Iter> >, __b> {
- using _UnwrappedIter = decltype(__unwrap_iter_impl<_Iter>::__unwrap(std::declval<_Iter>()));
- using _ReverseWrapper = reverse_iterator<reverse_iterator<_Iter> >;
+ using _UnwrappedIter [[__gnu__::__nodebug__]] = decltype(__unwrap_iter_impl<_Iter>::__unwrap(std::declval<_Iter>()));
+ using _ReverseWrapper [[__gnu__::__nodebug__]] = reverse_iterator<reverse_iterator<_Iter> >;
static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ReverseWrapper
__rewrap(_ReverseWrapper __orig_iter, _UnwrappedIter __unwrapped_iter) {
diff --git a/libcxx/include/__iterator/segmented_iterator.h b/libcxx/include/__iterator/segmented_iterator.h
index 8cb54a35a7f5ea..b208ffaac32308 100644
--- a/libcxx/include/__iterator/segmented_iterator.h
+++ b/libcxx/include/__iterator/segmented_iterator.h
@@ -72,7 +72,7 @@ template <class _Tp>
struct __has_specialization<_Tp, sizeof(_Tp) * 0> : true_type {};
template <class _Iterator>
-using __is_segmented_iterator = __has_specialization<__segmented_iterator_traits<_Iterator> >;
+using __is_segmented_iterator [[__gnu__::__nodebug__]] = __has_specialization<__segmented_iterator_traits<_Iterator> >;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__locale b/libcxx/include/__locale
index b675e01bac81e5..abd7a456eafdcf 100644
--- a/libcxx/include/__locale
+++ b/libcxx/include/__locale
@@ -50,7 +50,7 @@ _LIBCPP_HIDE_FROM_ABI const _Facet& use_facet(const locale&);
class _LIBCPP_EXPORTED_FROM_ABI locale {
public:
// locale is essentially a shared_ptr that doesn't support weak_ptrs and never got a move constructor.
- using __trivially_relocatable = locale;
+ using __trivially_relocatable [[__gnu__::__nodebug__]] = locale;
// types:
class _LIBCPP_EXPORTED_FROM_ABI facet;
diff --git a/libcxx/include/__locale_dir/locale_base_api.h b/libcxx/include/__locale_dir/locale_base_api.h
index 8ed4c29cb8732f..8b9fcd2ab26138 100644
--- a/libcxx/include/__locale_dir/locale_base_api.h
+++ b/libcxx/include/__locale_dir/locale_base_api.h
@@ -137,7 +137,7 @@ namespace __locale {
//
// Locale management
//
-using __locale_t = locale_t;
+using __locale_t [[__gnu__::__nodebug__]] = locale_t;
# ifndef _LIBCPP_MSVCRT_LIKE
inline _LIBCPP_HIDE_FROM_ABI __locale_t __uselocale(__locale_t __loc) { return uselocale(__loc); }
diff --git a/libcxx/include/__mdspan/extents.h b/libcxx/include/__mdspan/extents.h
index edbc30a7a40e42..e4e64dbff225e9 100644
--- a/libcxx/include/__mdspan/extents.h
+++ b/libcxx/include/__mdspan/extents.h
@@ -127,16 +127,16 @@ struct __maybe_static_array {
private:
// Static values member
- static constexpr size_t __size_ = sizeof...(_Values);
- static constexpr size_t __size_dynamic_ = ((_Values == _DynTag) + ... + 0);
- using _StaticValues = __static_array<_TStatic, _Values...>;
- using _DynamicValues = __possibly_empty_array<_TDynamic, __size_dynamic_>;
+ static constexpr size_t __size_ = sizeof...(_Values);
+ static constexpr size_t __size_dynamic_ = ((_Values == _DynTag) + ... + 0);
+ using _StaticValues [[__gnu__::__nodebug__]] = __static_array<_TStatic, _Values...>;
+ using _DynamicValues [[__gnu__::__nodebug__]] = __possibly_empty_array<_TDynamic, __size_dynamic_>;
// Dynamic values member
_LIBCPP_NO_UNIQUE_ADDRESS _DynamicValues __dyn_vals_;
// static mapping of indices to the position in the dynamic values array
- using _DynamicIdxMap = __static_partial_sums<static_cast<size_t>(_Values == _DynTag)...>;
+ using _DynamicIdxMap [[__gnu__::__nodebug__]] = __static_partial_sums<static_cast<size_t>(_Values == _DynTag)...>;
template <size_t... _Indices>
_LIBCPP_HIDE_FROM_ABI static constexpr _DynamicValues __zeros(index_sequence<_Indices...>) noexcept {
@@ -292,7 +292,8 @@ class extents {
static constexpr rank_type __rank_dynamic_ = ((_Extents == dynamic_extent) + ... + 0);
// internal storage type using __maybe_static_array
- using _Values = __mdspan_detail::__maybe_static_array<_IndexType, size_t, dynamic_extent, _Extents...>;
+ using _Values [[__gnu__::__nodebug__]] =
+ __mdspan_detail::__maybe_static_array<_IndexType, size_t, dynamic_extent, _Extents...>;
[[no_unique_address]] _Values __vals_;
public:
diff --git a/libcxx/include/__memory/allocation_guard.h b/libcxx/include/__memory/allocation_guard.h
index 66d6a5002c299e..cf2f9f8e6ed09b 100644
--- a/libcxx/include/__memory/allocation_guard.h
+++ b/libcxx/include/__memory/allocation_guard.h
@@ -45,8 +45,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// custom allocator.
template <class _Alloc>
struct __allocation_guard {
- using _Pointer = typename allocator_traits<_Alloc>::pointer;
- using _Size = typename allocator_traits<_Alloc>::size_type;
+ using _Pointer [[__gnu__::__nodebug__]] = typename allocator_traits<_Alloc>::pointer;
+ using _Size [[__gnu__::__nodebug__]] = typename allocator_traits<_Alloc>::size_type;
template <class _AllocT> // we perform the allocator conversion inside the constructor
_LIBCPP_HIDE_FROM_ABI explicit __allocation_guard(_AllocT __alloc, _Size __n)
diff --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h
index 62b454c9227523..d197fd27b2c5e8 100644
--- a/libcxx/include/__memory/allocator_traits.h
+++ b/libcxx/include/__memory/allocator_traits.h
@@ -44,10 +44,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// __pointer
template <class _Tp>
-using __pointer_member = typename _Tp::pointer;
+using __pointer_member [[__gnu__::__nodebug__]] = typename _Tp::pointer;
template <class _Tp, class _Alloc>
-using __pointer = __detected_or_t<_Tp*, __pointer_member, __libcpp_remove_reference_t<_Alloc> >;
+using __pointer [[__gnu__::__nodebug__]] =
+ __detected_or_t<_Tp*, __pointer_member, __libcpp_remove_reference_t<_Alloc> >;
// __const_pointer
_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_const_pointer, const_pointer);
@@ -96,10 +97,10 @@ struct __const_void_pointer<_Ptr, _Alloc, false> {
// __size_type
template <class _Tp>
-using __size_type_member = typename _Tp::size_type;
+using __size_type_member [[__gnu__::__nodebug__]] = typename _Tp::size_type;
template <class _Alloc, class _DiffType>
-using __size_type = __detected_or_t<__make_unsigned_t<_DiffType>, __size_type_member, _Alloc>;
+using __size_type [[__gnu__::__nodebug__]] = __detected_or_t<__make_unsigned_t<_DiffType>, __size_type_member, _Alloc>;
// __alloc_traits_difference_type
_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_alloc_traits_difference_type, difference_type);
@@ -114,33 +115,37 @@ struct __alloc_traits_difference_type<_Alloc, _Ptr, true> {
// __propagate_on_container_copy_assignment
template <class _Tp>
-using __propagate_on_container_copy_assignment_member = typename _Tp::propagate_on_container_copy_assignment;
+using __propagate_on_container_copy_assignment_member [[__gnu__::__nodebug__]] =
+ typename _Tp::propagate_on_container_copy_assignment;
template <class _Alloc>
-using __propagate_on_container_copy_assignment =
+using __propagate_on_container_copy_assignment [[__gnu__::__nodebug__]] =
__detected_or_t<false_type, __propagate_on_container_copy_assignment_member, _Alloc>;
// __propagate_on_container_move_assignment
template <class _Tp>
-using __propagate_on_container_move_assignment_member = typename _Tp::propagate_on_container_move_assignment;
+using __propagate_on_container_move_assignment_member [[__gnu__::__nodebug__]] =
+ typename _Tp::propagate_on_container_move_assignment;
template <class _Alloc>
-using __propagate_on_container_move_assignment =
+using __propagate_on_container_move_assignment [[__gnu__::__nodebug__]] =
__detected_or_t<false_type, __propagate_on_container_move_assignment_member, _Alloc>;
// __propagate_on_container_swap
template <class _Tp>
-using __propagate_on_container_swap_member = typename _Tp::propagate_on_container_swap;
+using __propagate_on_container_swap_member [[__gnu__::__nodebug__]] = typename _Tp::propagate_on_container_swap;
template <class _Alloc>
-using __propagate_on_container_swap = __detected_or_t<false_type, __propagate_on_container_swap_member, _Alloc>;
+using __propagate_on_container_swap [[__gnu__::__nodebug__]] =
+ __detected_or_t<false_type, __propagate_on_container_swap_member, _Alloc>;
// __is_always_equal
template <class _Tp>
-using __is_always_equal_member = typename _Tp::is_always_equal;
+using __is_always_equal_member [[__gnu__::__nodebug__]] = typename _Tp::is_always_equal;
template <class _Alloc>
-using __is_always_equal = __detected_or_t<typename is_empty<_Alloc>::type, __is_always_equal_member, _Alloc>;
+using __is_always_equal [[__gnu__::__nodebug__]] =
+ __detected_or_t<typename is_empty<_Alloc>::type, __is_always_equal_member, _Alloc>;
// __allocator_traits_rebind
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -165,7 +170,7 @@ struct __allocator_traits_rebind<_Alloc<_Tp, _Args...>, _Up, false> {
_LIBCPP_SUPPRESS_DEPRECATED_POP
template <class _Alloc, class _Tp>
-using __allocator_traits_rebind_t = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
+using __allocator_traits_rebind_t [[__gnu__::__nodebug__]] = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
@@ -360,7 +365,7 @@ using __rebind_alloc = typename _Traits::template rebind_alloc<_Tp>::other;
template <class _Alloc>
struct __check_valid_allocator : true_type {
- using _Traits = std::allocator_traits<_Alloc>;
+ using _Traits [[__gnu__::__nodebug__]] = std::allocator_traits<_Alloc>;
static_assert(is_same<_Alloc, __rebind_alloc<_Traits, typename _Traits::value_type> >::value,
"[allocator.requirements] states that rebinding an allocator to the same type should result in the "
"original allocator");
diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h
index 4acf3d18401ae4..81d1550c3bbebe 100644
--- a/libcxx/include/__memory/pointer_traits.h
+++ b/libcxx/include/__memory/pointer_traits.h
@@ -176,10 +176,10 @@ struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*> {
#ifndef _LIBCPP_CXX03_LANG
template <class _From, class _To>
-using __rebind_pointer_t = typename pointer_traits<_From>::template rebind<_To>;
+using __rebind_pointer_t [[__gnu__::__nodebug__]] = typename pointer_traits<_From>::template rebind<_To>;
#else
template <class _From, class _To>
-using __rebind_pointer_t = typename pointer_traits<_From>::template rebind<_To>::other;
+using __rebind_pointer_t [[__gnu__::__nodebug__]] = typename pointer_traits<_From>::template rebind<_To>::other;
#endif
// to_address
@@ -276,7 +276,7 @@ struct __pointer_of<_Tp> {
};
template <typename _Tp>
-using __pointer_of_t = typename __pointer_of<_Tp>::type;
+using __pointer_of_t [[__gnu__::__nodebug__]] = typename __pointer_of<_Tp>::type;
template <class _Tp, class _Up>
struct __pointer_of_or {
@@ -290,7 +290,7 @@ struct __pointer_of_or<_Tp, _Up> {
};
template <typename _Tp, typename _Up>
-using __pointer_of_or_t = typename __pointer_of_or<_Tp, _Up>::type;
+using __pointer_of_or_t [[__gnu__::__nodebug__]] = typename __pointer_of_or<_Tp, _Up>::type;
template <class _Smart>
concept __resettable_smart_pointer = requires(_Smart __s) { __s.reset(); };
diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h
index 5c34f2efc5730e..9e361f35c7e93a 100644
--- a/libcxx/include/__memory/shared_ptr.h
+++ b/libcxx/include/__memory/shared_ptr.h
@@ -141,7 +141,7 @@ struct __for_overwrite_tag {};
template <class _Tp, class _Alloc>
struct __shared_ptr_emplace : __shared_weak_count {
- using __value_type = __remove_cv_t<_Tp>;
+ using __value_type [[__gnu__::__nodebug__]] = __remove_cv_t<_Tp>;
template <class... _Args,
class _Allocator = _Alloc,
@@ -293,7 +293,8 @@ struct __shared_ptr_deleter_ctor_reqs {
};
template <class _Dp>
-using __shared_ptr_nullptr_deleter_ctor_reqs = _And<is_move_constructible<_Dp>, __well_formed_deleter<_Dp, nullptr_t> >;
+using __shared_ptr_nullptr_deleter_ctor_reqs [[__gnu__::__nodebug__]] =
+ _And<is_move_constructible<_Dp>, __well_formed_deleter<_Dp, nullptr_t> >;
#if defined(_LIBCPP_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI)
# define _LIBCPP_SHARED_PTR_TRIVIAL_ABI __attribute__((__trivial_abi__))
@@ -315,7 +316,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr {
// A shared_ptr contains only two raw pointers which point to the heap and move constructing already doesn't require
// any bookkeeping, so it's always trivially relocatable.
- using __trivially_relocatable = shared_ptr;
+ using __trivially_relocatable [[__gnu__::__nodebug__]] = shared_ptr;
private:
element_type* __ptr_;
@@ -1210,7 +1211,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr {
// A weak_ptr contains only two raw pointers which point to the heap and move constructing already doesn't require
// any bookkeeping, so it's always trivially relocatable.
- using __trivially_relocatable = weak_ptr;
+ using __trivially_relocatable [[__gnu__::__nodebug__]] = weak_ptr;
private:
element_type* __ptr_;
diff --git a/libcxx/include/__memory/unique_ptr.h b/libcxx/include/__memory/unique_ptr.h
index 9526255583dd56..df9f53e161bdc3 100644
--- a/libcxx/include/__memory/unique_ptr.h
+++ b/libcxx/include/__memory/unique_ptr.h
@@ -153,7 +153,7 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
//
// This unique_ptr implementation only contains a pointer to the unique object and a deleter, so there are no
// references to itself. This means that the entire structure is trivially relocatable if its members are.
- using __trivially_relocatable = __conditional_t<
+ using __trivially_relocatable [[__gnu__::__nodebug__]] = __conditional_t<
__libcpp_is_trivially_relocatable<pointer>::value && __libcpp_is_trivially_relocatable<deleter_type>::value,
unique_ptr,
void>;
@@ -189,7 +189,7 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
(!is_reference<_Dp>::value && is_convertible<_UDel, _Dp>::value) >;
template <class _UDel>
- using _EnableIfDeleterAssignable = __enable_if_t< is_assignable<_Dp&, _UDel&&>::value >;
+ using _EnableIfDeleterAssignable [[__gnu__::__nodebug__]] = __enable_if_t< is_assignable<_Dp&, _UDel&&>::value >;
public:
template <bool _Dummy = true, class = _EnableIfDeleterDefaultConstructible<_Dummy> >
@@ -419,7 +419,7 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
//
// This unique_ptr implementation only contains a pointer to the unique object and a deleter, so there are no
// references to itself. This means that the entire structure is trivially relocatable if its members are.
- using __trivially_relocatable = __conditional_t<
+ using __trivially_relocatable [[__gnu__::__nodebug__]] = __conditional_t<
__libcpp_is_trivially_relocatable<pointer>::value && __libcpp_is_trivially_relocatable<deleter_type>::value,
unique_ptr,
void>;
@@ -430,9 +430,9 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
_LIBCPP_COMPRESSED_PAIR(pointer, __ptr_, deleter_type, __deleter_);
#ifdef _LIBCPP_ABI_BOUNDED_UNIQUE_PTR
- using _BoundsChecker = __unique_ptr_array_bounds_stored;
+ using _BoundsChecker [[__gnu__::__nodebug__]] = __unique_ptr_array_bounds_stored;
#else
- using _BoundsChecker = __unique_ptr_array_bounds_stateless;
+ using _BoundsChecker [[__gnu__::__nodebug__]] = __unique_ptr_array_bounds_stateless;
#endif
_LIBCPP_NO_UNIQUE_ADDRESS _BoundsChecker __checker_;
diff --git a/libcxx/include/__memory/unique_temporary_buffer.h b/libcxx/include/__memory/unique_temporary_buffer.h
index 4f47c84e2f8dbe..55134c702f9db0 100644
--- a/libcxx/include/__memory/unique_temporary_buffer.h
+++ b/libcxx/include/__memory/unique_temporary_buffer.h
@@ -44,7 +44,7 @@ struct __temporary_buffer_deleter {
};
template <class _Tp>
-using __unique_temporary_buffer = unique_ptr<_Tp, __temporary_buffer_deleter<_Tp> >;
+using __unique_temporary_buffer [[__gnu__::__nodebug__]] = unique_ptr<_Tp, __temporary_buffer_deleter<_Tp> >;
template <class _Tp>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI _LIBCPP_CONSTEXPR_SINCE_CXX23 __unique_temporary_buffer<_Tp>
diff --git a/libcxx/include/__node_handle b/libcxx/include/__node_handle
index d0b35bfd193409..d61439959e69a4 100644
--- a/libcxx/include/__node_handle
+++ b/libcxx/include/__node_handle
@@ -188,10 +188,10 @@ struct __map_node_handle_specifics {
};
template <class _NodeType, class _Alloc>
-using __set_node_handle = __basic_node_handle< _NodeType, _Alloc, __set_node_handle_specifics>;
+using __set_node_handle [[__gnu__::__nodebug__]] = __basic_node_handle< _NodeType, _Alloc, __set_node_handle_specifics>;
template <class _NodeType, class _Alloc>
-using __map_node_handle = __basic_node_handle< _NodeType, _Alloc, __map_node_handle_specifics>;
+using __map_node_handle [[__gnu__::__nodebug__]] = __basic_node_handle< _NodeType, _Alloc, __map_node_handle_specifics>;
template <class _Iterator, class _NodeType>
struct _LIBCPP_TEMPLATE_VIS __insert_return_type {
diff --git a/libcxx/include/__pstl/backend_fwd.h b/libcxx/include/__pstl/backend_fwd.h
index 2132e8dbceb3ad..1aef25a731bdfd 100644
--- a/libcxx/include/__pstl/backend_fwd.h
+++ b/libcxx/include/__pstl/backend_fwd.h
@@ -53,11 +53,14 @@ struct __serial_backend_tag;
struct __std_thread_backend_tag;
# if defined(_LIBCPP_PSTL_BACKEND_SERIAL)
-using __current_configuration = __backend_configuration<__serial_backend_tag, __default_backend_tag>;
+using __current_configuration [[__gnu__::__nodebug__]] =
+ __backend_configuration<__serial_backend_tag, __default_backend_tag>;
# elif defined(_LIBCPP_PSTL_BACKEND_STD_THREAD)
-using __current_configuration = __backend_configuration<__std_thread_backend_tag, __default_backend_tag>;
+using __current_configuration [[__gnu__::__nodebug__]] =
+ __backend_configuration<__std_thread_backend_tag, __default_backend_tag>;
# elif defined(_LIBCPP_PSTL_BACKEND_LIBDISPATCH)
-using __current_configuration = __backend_configuration<__libdispatch_backend_tag, __default_backend_tag>;
+using __current_configuration [[__gnu__::__nodebug__]] =
+ __backend_configuration<__libdispatch_backend_tag, __default_backend_tag>;
# else
// ...New vendors can add parallel backends here...
diff --git a/libcxx/include/__pstl/dispatch.h b/libcxx/include/__pstl/dispatch.h
index ea40fa79eb9496..da3a12696f54b3 100644
--- a/libcxx/include/__pstl/dispatch.h
+++ b/libcxx/include/__pstl/dispatch.h
@@ -58,7 +58,8 @@ struct __find_first_implemented<_Algorithm, __backend_configuration<_B1, _Bn...>
__find_first_implemented<_Algorithm, __backend_configuration<_Bn...>, _ExecutionPolicy> > {};
template <template <class, class> class _Algorithm, class _BackendConfiguration, class _ExecutionPolicy>
-using __dispatch = typename __find_first_implemented<_Algorithm, _BackendConfiguration, _ExecutionPolicy>::type;
+using __dispatch [[__gnu__::__nodebug__]] =
+ typename __find_first_implemented<_Algorithm, _BackendConfiguration, _ExecutionPolicy>::type;
} // namespace __pstl
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__ranges/chunk_by_view.h b/libcxx/include/__ranges/chunk_by_view.h
index e4df589bc286f7..8ac450967e55e2 100644
--- a/libcxx/include/__ranges/chunk_by_view.h
+++ b/libcxx/include/__ranges/chunk_by_view.h
@@ -59,7 +59,7 @@ class _LIBCPP_ABI_LLVM18_NO_UNIQUE_ADDRESS chunk_by_view : public view_interface
_LIBCPP_NO_UNIQUE_ADDRESS __movable_box<_Pred> __pred_;
// We cache the result of begin() to allow providing an amortized O(1).
- using _Cache = __non_propagating_cache<iterator_t<_View>>;
+ using _Cache [[__gnu__::__nodebug__]] = __non_propagating_cache<iterator_t<_View>>;
_Cache __cached_begin_;
class __iterator;
diff --git a/libcxx/include/__ranges/drop_view.h b/libcxx/include/__ranges/drop_view.h
index 87f66f17a2abe6..f159f481be663d 100644
--- a/libcxx/include/__ranges/drop_view.h
+++ b/libcxx/include/__ranges/drop_view.h
@@ -63,8 +63,8 @@ class drop_view : public view_interface<drop_view<_View>> {
// begin because begin is not equality preserving.
// Note: drop_view<input-range>::begin() is still trivially amortized O(1) because
// one can't call begin() on it more than once.
- static constexpr bool _UseCache = forward_range<_View> && !(random_access_range<_View> && sized_range<_View>);
- using _Cache = _If<_UseCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
+ static constexpr bool _UseCache = forward_range<_View> && !(random_access_range<_View> && sized_range<_View>);
+ using _Cache [[__gnu__::__nodebug__]] = _If<_UseCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
_LIBCPP_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
range_difference_t<_View> __count_ = 0;
_View __base_ = _View();
@@ -204,7 +204,7 @@ struct __passthrough_type<subrange<_Iter, _Sent, _Kind>> {
};
template <class _Tp>
-using __passthrough_type_t = typename __passthrough_type<_Tp>::type;
+using __passthrough_type_t [[__gnu__::__nodebug__]] = typename __passthrough_type<_Tp>::type;
struct __fn {
// [range.drop.overview]: the `empty_view` case.
diff --git a/libcxx/include/__ranges/drop_while_view.h b/libcxx/include/__ranges/drop_while_view.h
index 6413ff52bc0e01..127865c9586ebe 100644
--- a/libcxx/include/__ranges/drop_while_view.h
+++ b/libcxx/include/__ranges/drop_while_view.h
@@ -89,8 +89,8 @@ class _LIBCPP_ABI_LLVM18_NO_UNIQUE_ADDRESS drop_while_view : public view_interfa
_LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
_LIBCPP_NO_UNIQUE_ADDRESS __movable_box<_Pred> __pred_;
- static constexpr bool _UseCache = forward_range<_View>;
- using _Cache = _If<_UseCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
+ static constexpr bool _UseCache = forward_range<_View>;
+ using _Cache [[__gnu__::__nodebug__]] = _If<_UseCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
_LIBCPP_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
};
diff --git a/libcxx/include/__ranges/elements_view.h b/libcxx/include/__ranges/elements_view.h
index c99282f37960c3..fe7894a52fd786 100644
--- a/libcxx/include/__ranges/elements_view.h
+++ b/libcxx/include/__ranges/elements_view.h
@@ -171,7 +171,7 @@ class elements_view<_View, _Np>::__iterator
template <bool>
friend class __sentinel;
- using _Base = __maybe_const<_Const, _View>;
+ using _Base [[__gnu__::__nodebug__]] = __maybe_const<_Const, _View>;
iterator_t<_Base> __current_ = iterator_t<_Base>();
@@ -335,7 +335,7 @@ template <input_range _View, size_t _Np>
template <bool _Const>
class elements_view<_View, _Np>::__sentinel {
private:
- using _Base = __maybe_const<_Const, _View>;
+ using _Base [[__gnu__::__nodebug__]] = __maybe_const<_Const, _View>;
_LIBCPP_NO_UNIQUE_ADDRESS sentinel_t<_Base> __end_ = sentinel_t<_Base>();
template <bool>
diff --git a/libcxx/include/__ranges/filter_view.h b/libcxx/include/__ranges/filter_view.h
index 22f67b2d967d56..4048cd362da36c 100644
--- a/libcxx/include/__ranges/filter_view.h
+++ b/libcxx/include/__ranges/filter_view.h
@@ -60,8 +60,8 @@ class _LIBCPP_ABI_LLVM18_NO_UNIQUE_ADDRESS filter_view : public view_interface<f
// We cache the result of begin() to allow providing an amortized O(1) begin() whenever
// the underlying range is at least a forward_range.
- static constexpr bool _UseCache = forward_range<_View>;
- using _Cache = _If<_UseCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
+ static constexpr bool _UseCache = forward_range<_View>;
+ using _Cache [[__gnu__::__nodebug__]] = _If<_UseCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
_LIBCPP_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
class __iterator;
@@ -115,7 +115,7 @@ struct __filter_iterator_category {};
template <forward_range _View>
struct __filter_iterator_category<_View> {
- using _Cat = typename iterator_traits<iterator_t<_View>>::iterator_category;
+ using _Cat [[__gnu__::__nodebug__]] = typename iterator_traits<iterator_t<_View>>::iterator_category;
using iterator_category =
_If<derived_from<_Cat, bidirectional_iterator_tag>,
bidirectional_iterator_tag,
diff --git a/libcxx/include/__ranges/iota_view.h b/libcxx/include/__ranges/iota_view.h
index b2fa958a0f56e0..c87b85de12b4be 100644
--- a/libcxx/include/__ranges/iota_view.h
+++ b/libcxx/include/__ranges/iota_view.h
@@ -68,7 +68,7 @@ struct __get_wider_signed {
};
template <class _Start>
-using _IotaDiffT =
+using _IotaDiffT [[__gnu__::__nodebug__]] =
typename _If< (!integral<_Start> || sizeof(iter_difference_t<_Start>) > sizeof(_Start)),
type_identity<iter_difference_t<_Start>>,
__get_wider_signed<_Start> >::type;
diff --git a/libcxx/include/__ranges/join_view.h b/libcxx/include/__ranges/join_view.h
index 9c2c77995539bd..2c85a9b794291d 100644
--- a/libcxx/include/__ranges/join_view.h
+++ b/libcxx/include/__ranges/join_view.h
@@ -55,8 +55,9 @@ struct __join_view_iterator_category {};
template <class _View>
requires is_reference_v<range_reference_t<_View>> && forward_range<_View> && forward_range<range_reference_t<_View>>
struct __join_view_iterator_category<_View> {
- using _OuterC = typename iterator_traits<iterator_t<_View>>::iterator_category;
- using _InnerC = typename iterator_traits<iterator_t<range_reference_t<_View>>>::iterator_category;
+ using _OuterC [[__gnu__::__nodebug__]] = typename iterator_traits<iterator_t<_View>>::iterator_category;
+ using _InnerC [[__gnu__::__nodebug__]] =
+ typename iterator_traits<iterator_t<range_reference_t<_View>>>::iterator_category;
using iterator_category =
_If< derived_from<_OuterC, bidirectional_iterator_tag> && derived_from<_InnerC, bidirectional_iterator_tag> &&
@@ -71,7 +72,7 @@ template <input_range _View>
requires view<_View> && input_range<range_reference_t<_View>>
class join_view : public view_interface<join_view<_View>> {
private:
- using _InnerRange = range_reference_t<_View>;
+ using _InnerRange [[__gnu__::__nodebug__]] = range_reference_t<_View>;
template <bool>
struct __iterator;
@@ -85,11 +86,13 @@ class join_view : public view_interface<join_view<_View>> {
_LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
static constexpr bool _UseOuterCache = !forward_range<_View>;
- using _OuterCache = _If<_UseOuterCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
+ using _OuterCache [[__gnu__::__nodebug__]] =
+ _If<_UseOuterCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
_LIBCPP_NO_UNIQUE_ADDRESS _OuterCache __outer_;
static constexpr bool _UseInnerCache = !is_reference_v<_InnerRange>;
- using _InnerCache = _If<_UseInnerCache, __non_propagating_cache<remove_cvref_t<_InnerRange>>, __empty_cache>;
+ using _InnerCache [[__gnu__::__nodebug__]] =
+ _If<_UseInnerCache, __non_propagating_cache<remove_cvref_t<_InnerRange>>, __empty_cache>;
_LIBCPP_NO_UNIQUE_ADDRESS _InnerCache __inner_;
public:
@@ -155,9 +158,9 @@ struct join_view<_View>::__sentinel {
template <bool>
friend struct __sentinel;
- using _Parent = __maybe_const<_Const, join_view>;
- using _Base = __maybe_const<_Const, _View>;
- sentinel_t<_Base> __end_ = sentinel_t<_Base>();
+ using _Parent [[__gnu__::__nodebug__]] = __maybe_const<_Const, join_view>;
+ using _Base [[__gnu__::__nodebug__]] = __maybe_const<_Const, _View>;
+ sentinel_t<_Base> __end_ = sentinel_t<_Base>();
public:
_LIBCPP_HIDE_FROM_ABI __sentinel() = default;
@@ -190,18 +193,18 @@ struct join_view<_View>::__iterator final : public __join_view_iterator_category
static constexpr bool __is_join_view_iterator = true;
private:
- using _Parent = __maybe_const<_Const, join_view<_View>>;
- using _Base = __maybe_const<_Const, _View>;
- using _Outer = iterator_t<_Base>;
- using _Inner = iterator_t<range_reference_t<_Base>>;
- using _InnerRange = range_reference_t<_View>;
+ using _Parent [[__gnu__::__nodebug__]] = __maybe_const<_Const, join_view<_View>>;
+ using _Base [[__gnu__::__nodebug__]] = __maybe_const<_Const, _View>;
+ using _Outer [[__gnu__::__nodebug__]] = iterator_t<_Base>;
+ using _Inner [[__gnu__::__nodebug__]] = iterator_t<range_reference_t<_Base>>;
+ using _InnerRange [[__gnu__::__nodebug__]] = range_reference_t<_View>;
static_assert(!_Const || forward_range<_Base>, "Const can only be true when Base models forward_range.");
static constexpr bool __ref_is_glvalue = is_reference_v<range_reference_t<_Base>>;
static constexpr bool _OuterPresent = forward_range<_Base>;
- using _OuterType = _If<_OuterPresent, _Outer, std::__empty>;
+ using _OuterType [[__gnu__::__nodebug__]] = _If<_OuterPresent, _Outer, std::__empty>;
_LIBCPP_NO_UNIQUE_ADDRESS _OuterType __outer_ = _OuterType();
optional<_Inner> __inner_;
@@ -377,9 +380,9 @@ template <class _JoinViewIterator>
__has_random_access_iterator_category<typename _JoinViewIterator::_Outer>::value &&
__has_random_access_iterator_category<typename _JoinViewIterator::_Inner>::value)
struct __segmented_iterator_traits<_JoinViewIterator> {
- using __segment_iterator =
- _LIBCPP_NODEBUG __iterator_with_data<typename _JoinViewIterator::_Outer, typename _JoinViewIterator::_Parent*>;
- using __local_iterator = typename _JoinViewIterator::_Inner;
+ using __segment_iterator [[__gnu__::__nodebug__]] =
+ __iterator_with_data<typename _JoinViewIterator::_Outer, typename _JoinViewIterator::_Parent*>;
+ using __local_iterator [[__gnu__::__nodebug__]] = typename _JoinViewIterator::_Inner;
// TODO: Would it make sense to enable the optimization for other iterator types?
diff --git a/libcxx/include/__ranges/lazy_split_view.h b/libcxx/include/__ranges/lazy_split_view.h
index 0dcbc134a21f26..a7dcec3afe50cf 100644
--- a/libcxx/include/__ranges/lazy_split_view.h
+++ b/libcxx/include/__ranges/lazy_split_view.h
@@ -72,7 +72,8 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
_LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
_LIBCPP_NO_UNIQUE_ADDRESS _Pattern __pattern_ = _Pattern();
- using _MaybeCurrent = _If<!forward_range<_View>, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
+ using _MaybeCurrent [[__gnu__::__nodebug__]] =
+ _If<!forward_range<_View>, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
_LIBCPP_NO_UNIQUE_ADDRESS _MaybeCurrent __current_ = _MaybeCurrent();
template <bool>
@@ -146,11 +147,11 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
friend struct __inner_iterator;
friend __outer_iterator<true>;
- using _Parent = __maybe_const<_Const, lazy_split_view>;
- using _Base = __maybe_const<_Const, _View>;
+ using _Parent [[__gnu__::__nodebug__]] = __maybe_const<_Const, lazy_split_view>;
+ using _Base [[__gnu__::__nodebug__]] = __maybe_const<_Const, _View>;
_Parent* __parent_ = nullptr;
- using _MaybeCurrent = _If<forward_range<_View>, iterator_t<_Base>, __empty_cache>;
+ using _MaybeCurrent [[__gnu__::__nodebug__]] = _If<forward_range<_View>, iterator_t<_Base>, __empty_cache>;
_LIBCPP_NO_UNIQUE_ADDRESS _MaybeCurrent __current_ = _MaybeCurrent();
bool __trailing_empty_ = false;
@@ -283,7 +284,7 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
template <bool _Const>
struct __inner_iterator : __inner_iterator_category<__maybe_const<_Const, _View>> {
private:
- using _Base = __maybe_const<_Const, _View>;
+ using _Base [[__gnu__::__nodebug__]] = __maybe_const<_Const, _View>;
// Workaround for a GCC issue.
static constexpr bool _OuterConst = _Const;
__outer_iterator<_Const> __i_ = __outer_iterator<_OuterConst>();
diff --git a/libcxx/include/__ranges/repeat_view.h b/libcxx/include/__ranges/repeat_view.h
index 93ceaf1711d329..1261951fe01831 100644
--- a/libcxx/include/__ranges/repeat_view.h
+++ b/libcxx/include/__ranges/repeat_view.h
@@ -61,7 +61,8 @@ struct __repeat_view_iterator_difference<_Tp> {
};
template <class _Tp>
-using __repeat_view_iterator_difference_t = typename __repeat_view_iterator_difference<_Tp>::type;
+using __repeat_view_iterator_difference_t [[__gnu__::__nodebug__]] =
+ typename __repeat_view_iterator_difference<_Tp>::type;
namespace views::__drop {
struct __fn;
@@ -139,7 +140,7 @@ template <move_constructible _Tp, semiregular _Bound>
class repeat_view<_Tp, _Bound>::__iterator {
friend class repeat_view;
- using _IndexT = conditional_t<same_as<_Bound, unreachable_sentinel_t>, ptrdiff_t, _Bound>;
+ using _IndexT [[__gnu__::__nodebug__]] = conditional_t<same_as<_Bound, unreachable_sentinel_t>, ptrdiff_t, _Bound>;
_LIBCPP_HIDE_FROM_ABI constexpr explicit __iterator(const _Tp* __value, _IndexT __bound_sentinel = _IndexT())
: __value_(__value), __current_(__bound_sentinel) {}
diff --git a/libcxx/include/__ranges/reverse_view.h b/libcxx/include/__ranges/reverse_view.h
index 796f5be22328b5..6df3576b7fe5a2 100644
--- a/libcxx/include/__ranges/reverse_view.h
+++ b/libcxx/include/__ranges/reverse_view.h
@@ -47,7 +47,8 @@ class reverse_view : public view_interface<reverse_view<_View>> {
// We cache begin() whenever ranges::next is not guaranteed O(1) to provide an
// amortized O(1) begin() method.
static constexpr bool _UseCache = !random_access_range<_View> && !common_range<_View>;
- using _Cache = _If<_UseCache, __non_propagating_cache<reverse_iterator<iterator_t<_View>>>, __empty_cache>;
+ using _Cache [[__gnu__::__nodebug__]] =
+ _If<_UseCache, __non_propagating_cache<reverse_iterator<iterator_t<_View>>>, __empty_cache>;
_LIBCPP_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
_LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
diff --git a/libcxx/include/__ranges/split_view.h b/libcxx/include/__ranges/split_view.h
index 7527281905ffeb..e1e085dddec9eb 100644
--- a/libcxx/include/__ranges/split_view.h
+++ b/libcxx/include/__ranges/split_view.h
@@ -52,7 +52,7 @@ class split_view : public view_interface<split_view<_View, _Pattern>> {
private:
_LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
_LIBCPP_NO_UNIQUE_ADDRESS _Pattern __pattern_ = _Pattern();
- using _Cache = __non_propagating_cache<subrange<iterator_t<_View>>>;
+ using _Cache [[__gnu__::__nodebug__]] = __non_propagating_cache<subrange<iterator_t<_View>>>;
_Cache __cached_begin_ = _Cache();
template <class, class>
diff --git a/libcxx/include/__ranges/subrange.h b/libcxx/include/__ranges/subrange.h
index a40eab3c5a257e..58748604dbb68b 100644
--- a/libcxx/include/__ranges/subrange.h
+++ b/libcxx/include/__ranges/subrange.h
@@ -82,7 +82,7 @@ class _LIBCPP_TEMPLATE_VIS subrange : public view_interface<subrange<_Iter, _Sen
struct _Empty {
_LIBCPP_HIDE_FROM_ABI constexpr _Empty(auto) noexcept {}
};
- using _Size = conditional_t<_StoreSize, make_unsigned_t<iter_difference_t<_Iter>>, _Empty>;
+ using _Size [[__gnu__::__nodebug__]] = conditional_t<_StoreSize, make_unsigned_t<iter_difference_t<_Iter>>, _Empty>;
_LIBCPP_NO_UNIQUE_ADDRESS _Iter __begin_ = _Iter();
_LIBCPP_NO_UNIQUE_ADDRESS _Sent __end_ = _Sent();
_LIBCPP_NO_UNIQUE_ADDRESS _Size __size_ = 0;
diff --git a/libcxx/include/__ranges/take_view.h b/libcxx/include/__ranges/take_view.h
index 39f99cee6b4dad..abdab019c43018 100644
--- a/libcxx/include/__ranges/take_view.h
+++ b/libcxx/include/__ranges/take_view.h
@@ -161,9 +161,9 @@ class take_view : public view_interface<take_view<_View>> {
template <view _View>
template <bool _Const>
class take_view<_View>::__sentinel {
- using _Base = __maybe_const<_Const, _View>;
+ using _Base [[__gnu__::__nodebug__]] = __maybe_const<_Const, _View>;
template <bool _OtherConst>
- using _Iter = counted_iterator<iterator_t<__maybe_const<_OtherConst, _View>>>;
+ using _Iter [[__gnu__::__nodebug__]] = counted_iterator<iterator_t<__maybe_const<_OtherConst, _View>>>;
_LIBCPP_NO_UNIQUE_ADDRESS sentinel_t<_Base> __end_ = sentinel_t<_Base>();
template <bool>
@@ -244,7 +244,7 @@ struct __passthrough_type<subrange<_Iter, _Sent, _Kind>> {
};
template <class _Tp>
-using __passthrough_type_t = typename __passthrough_type<_Tp>::type;
+using __passthrough_type_t [[__gnu__::__nodebug__]] = typename __passthrough_type<_Tp>::type;
struct __fn {
// [range.take.overview]: the `empty_view` case.
diff --git a/libcxx/include/__ranges/take_while_view.h b/libcxx/include/__ranges/take_while_view.h
index b7cb0aef58f114..d2f68c27706240 100644
--- a/libcxx/include/__ranges/take_while_view.h
+++ b/libcxx/include/__ranges/take_while_view.h
@@ -103,7 +103,7 @@ template <view _View, class _Pred>
requires input_range<_View> && is_object_v<_Pred> && indirect_unary_predicate<const _Pred, iterator_t<_View>>
template <bool _Const>
class take_while_view<_View, _Pred>::__sentinel {
- using _Base = __maybe_const<_Const, _View>;
+ using _Base [[__gnu__::__nodebug__]] = __maybe_const<_Const, _View>;
sentinel_t<_Base> __end_ = sentinel_t<_Base>();
const _Pred* __pred_ = nullptr;
diff --git a/libcxx/include/__ranges/transform_view.h b/libcxx/include/__ranges/transform_view.h
index 0ce1bfe883500f..43009b4804a310 100644
--- a/libcxx/include/__ranges/transform_view.h
+++ b/libcxx/include/__ranges/transform_view.h
@@ -159,7 +159,7 @@ struct __transform_view_iterator_category_base {};
template <forward_range _View, class _Fn>
struct __transform_view_iterator_category_base<_View, _Fn> {
- using _Cat = typename iterator_traits<iterator_t<_View>>::iterator_category;
+ using _Cat [[__gnu__::__nodebug__]] = typename iterator_traits<iterator_t<_View>>::iterator_category;
using iterator_category =
conditional_t< is_reference_v<invoke_result_t<_Fn&, range_reference_t<_View>>>,
@@ -177,8 +177,8 @@ template <bool _Const>
class transform_view<_View, _Fn>::__iterator
: public __transform_view_iterator_category_base<_View, __maybe_const<_Const, _Fn>> {
- using _Parent = __maybe_const<_Const, transform_view>;
- using _Base = __maybe_const<_Const, _View>;
+ using _Parent [[__gnu__::__nodebug__]] = __maybe_const<_Const, transform_view>;
+ using _Base [[__gnu__::__nodebug__]] = __maybe_const<_Const, _View>;
_Parent* __parent_ = nullptr;
@@ -338,8 +338,8 @@ template <input_range _View, copy_constructible _Fn>
requires __transform_view_constraints<_View, _Fn>
template <bool _Const>
class transform_view<_View, _Fn>::__sentinel {
- using _Parent = __maybe_const<_Const, transform_view>;
- using _Base = __maybe_const<_Const, _View>;
+ using _Parent [[__gnu__::__nodebug__]] = __maybe_const<_Const, transform_view>;
+ using _Base [[__gnu__::__nodebug__]] = __maybe_const<_Const, _View>;
sentinel_t<_Base> __end_ = sentinel_t<_Base>();
diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer
index a637c83d17d107..45544367aafdb7 100644
--- a/libcxx/include/__split_buffer
+++ b/libcxx/include/__split_buffer
@@ -53,24 +53,24 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Allocator = allocator<_Tp> >
struct __split_buffer {
public:
- using value_type = _Tp;
- using allocator_type = _Allocator;
- using __alloc_rr = __libcpp_remove_reference_t<allocator_type>;
- using __alloc_traits = allocator_traits<__alloc_rr>;
- using reference = value_type&;
- using const_reference = const value_type&;
- using size_type = typename __alloc_traits::size_type;
- using difference_type = typename __alloc_traits::difference_type;
- using pointer = typename __alloc_traits::pointer;
- using const_pointer = typename __alloc_traits::const_pointer;
- using iterator = pointer;
- using const_iterator = const_pointer;
+ using value_type = _Tp;
+ using allocator_type = _Allocator;
+ using __alloc_rr [[__gnu__::__nodebug__]] = __libcpp_remove_reference_t<allocator_type>;
+ using __alloc_traits [[__gnu__::__nodebug__]] = allocator_traits<__alloc_rr>;
+ using reference = value_type&;
+ using const_reference = const value_type&;
+ using size_type = typename __alloc_traits::size_type;
+ using difference_type = typename __alloc_traits::difference_type;
+ using pointer = typename __alloc_traits::pointer;
+ using const_pointer = typename __alloc_traits::const_pointer;
+ using iterator = pointer;
+ using const_iterator = const_pointer;
// A __split_buffer contains the following members which may be trivially relocatable:
// - pointer: may be trivially relocatable, so it's checked
// - allocator_type: may be trivially relocatable, so it's checked
// __split_buffer doesn't have any self-references, so it's trivially relocatable if its members are.
- using __trivially_relocatable = __conditional_t<
+ using __trivially_relocatable [[__gnu__::__nodebug__]] = __conditional_t<
__libcpp_is_trivially_relocatable<pointer>::value && __libcpp_is_trivially_relocatable<allocator_type>::value,
__split_buffer,
void>;
diff --git a/libcxx/include/__stop_token/stop_state.h b/libcxx/include/__stop_token/stop_state.h
index 84dc208dda36e6..4ac62fc73d3eee 100644
--- a/libcxx/include/__stop_token/stop_state.h
+++ b/libcxx/include/__stop_token/stop_state.h
@@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_THREADS
struct __stop_callback_base : __intrusive_node_base<__stop_callback_base> {
- using __callback_fn_t = void(__stop_callback_base*) noexcept;
+ using __callback_fn_t [[__gnu__::__nodebug__]] = void(__stop_callback_base*) noexcept;
_LIBCPP_HIDE_FROM_ABI explicit __stop_callback_base(__callback_fn_t* __callback_fn) : __callback_fn_(__callback_fn) {}
_LIBCPP_HIDE_FROM_ABI void __invoke() noexcept { __callback_fn_(this); }
@@ -58,9 +58,9 @@ class __stop_state {
// It is used by __intrusive_shared_ptr, but it is stored here for better layout
atomic<uint32_t> __ref_count_ = 0;
- using __state_t = uint32_t;
- using __callback_list_lock = __atomic_unique_lock<__state_t, __callback_list_locked_bit>;
- using __callback_list = __intrusive_list_view<__stop_callback_base>;
+ using __state_t [[__gnu__::__nodebug__]] = uint32_t;
+ using __callback_list_lock [[__gnu__::__nodebug__]] = __atomic_unique_lock<__state_t, __callback_list_locked_bit>;
+ using __callback_list [[__gnu__::__nodebug__]] = __intrusive_list_view<__stop_callback_base>;
__callback_list __callback_list_;
__thread_id __requesting_thread_;
diff --git a/libcxx/include/__thread/support/pthread.h b/libcxx/include/__thread/support/pthread.h
index 531f3e71de8397..203f5616ae687b 100644
--- a/libcxx/include/__thread/support/pthread.h
+++ b/libcxx/include/__thread/support/pthread.h
@@ -39,7 +39,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-using __libcpp_timespec_t = ::timespec;
+using __libcpp_timespec_t [[__gnu__::__nodebug__]] = ::timespec;
//
// Mutex
diff --git a/libcxx/include/__tuple/make_tuple_types.h b/libcxx/include/__tuple/make_tuple_types.h
index 024e9c524b527a..f52728be308463 100644
--- a/libcxx/include/__tuple/make_tuple_types.h
+++ b/libcxx/include/__tuple/make_tuple_types.h
@@ -47,9 +47,9 @@ struct __make_tuple_types_flat<_Tuple<_Types...>, __tuple_indices<_Idx...>> {
template <class _Vt, size_t _Np, size_t... _Idx>
struct __make_tuple_types_flat<array<_Vt, _Np>, __tuple_indices<_Idx...>> {
template <size_t>
- using __value_type = _Vt;
+ using __value_type [[__gnu__::__nodebug__]] = _Vt;
template <class _Tp>
- using __apply_quals = __tuple_types<__copy_cvref_t<_Tp, __value_type<_Idx>>...>;
+ using __apply_quals [[__gnu__::__nodebug__]] = __tuple_types<__copy_cvref_t<_Tp, __value_type<_Idx>>...>;
};
template <class _Tp,
@@ -58,9 +58,10 @@ template <class _Tp,
bool _SameSize = (_Ep == tuple_size<__libcpp_remove_reference_t<_Tp> >::value)>
struct __make_tuple_types {
static_assert(_Sp <= _Ep, "__make_tuple_types input error");
- using _RawTp = __remove_cvref_t<_Tp>;
- using _Maker = __make_tuple_types_flat<_RawTp, typename __make_tuple_indices<_Ep, _Sp>::type>;
- using type = typename _Maker::template __apply_quals<_Tp>;
+ using _RawTp [[__gnu__::__nodebug__]] = __remove_cvref_t<_Tp>;
+ using _Maker [[__gnu__::__nodebug__]] =
+ __make_tuple_types_flat<_RawTp, typename __make_tuple_indices<_Ep, _Sp>::type>;
+ using type = typename _Maker::template __apply_quals<_Tp>;
};
template <class... _Types, size_t _Ep>
diff --git a/libcxx/include/__tuple/sfinae_helpers.h b/libcxx/include/__tuple/sfinae_helpers.h
index a785cec138b2f8..e00b78d449261e 100644
--- a/libcxx/include/__tuple/sfinae_helpers.h
+++ b/libcxx/include/__tuple/sfinae_helpers.h
@@ -41,7 +41,7 @@ struct __tuple_sfinae_base {
static auto __do_test(...) -> false_type;
template <class _FromArgs, class _ToArgs>
- using __constructible = decltype(__do_test<is_constructible>(_ToArgs{}, _FromArgs{}));
+ using __constructible [[__gnu__::__nodebug__]] = decltype(__do_test<is_constructible>(_ToArgs{}, _FromArgs{}));
};
// __tuple_constructible
diff --git a/libcxx/include/__tuple/tuple_size.h b/libcxx/include/__tuple/tuple_size.h
index b970280fe37842..3605672e9df40e 100644
--- a/libcxx/include/__tuple/tuple_size.h
+++ b/libcxx/include/__tuple/tuple_size.h
@@ -29,7 +29,7 @@ struct _LIBCPP_TEMPLATE_VIS tuple_size;
#if !defined(_LIBCPP_CXX03_LANG)
template <class _Tp, class...>
-using __enable_if_tuple_size_imp = _Tp;
+using __enable_if_tuple_size_imp [[__gnu__::__nodebug__]] = _Tp;
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp< const _Tp,
diff --git a/libcxx/include/__type_traits/add_lvalue_reference.h b/libcxx/include/__type_traits/add_lvalue_reference.h
index a633e390453205..6118c632014acd 100644
--- a/libcxx/include/__type_traits/add_lvalue_reference.h
+++ b/libcxx/include/__type_traits/add_lvalue_reference.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__add_lvalue_reference)
template <class _Tp>
-using __add_lvalue_reference_t = __add_lvalue_reference(_Tp);
+using __add_lvalue_reference_t [[__gnu__::__nodebug__]] = __add_lvalue_reference(_Tp);
#else
diff --git a/libcxx/include/__type_traits/add_pointer.h b/libcxx/include/__type_traits/add_pointer.h
index 5aac7d5cfa90d8..963e28a800aec9 100644
--- a/libcxx/include/__type_traits/add_pointer.h
+++ b/libcxx/include/__type_traits/add_pointer.h
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer)
template <class _Tp>
-using __add_pointer_t = __add_pointer(_Tp);
+using __add_pointer_t [[__gnu__::__nodebug__]] = __add_pointer(_Tp);
#else
template <class _Tp, bool = __libcpp_is_referenceable<_Tp>::value || is_void<_Tp>::value>
diff --git a/libcxx/include/__type_traits/add_rvalue_reference.h b/libcxx/include/__type_traits/add_rvalue_reference.h
index a54aae7ec8de5d..63201e6c645cfa 100644
--- a/libcxx/include/__type_traits/add_rvalue_reference.h
+++ b/libcxx/include/__type_traits/add_rvalue_reference.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__add_rvalue_reference)
template <class _Tp>
-using __add_rvalue_reference_t = __add_rvalue_reference(_Tp);
+using __add_rvalue_reference_t [[__gnu__::__nodebug__]] = __add_rvalue_reference(_Tp);
#else
diff --git a/libcxx/include/__type_traits/common_reference.h b/libcxx/include/__type_traits/common_reference.h
index c802902eb19fc3..3a287d12a03d90 100644
--- a/libcxx/include/__type_traits/common_reference.h
+++ b/libcxx/include/__type_traits/common_reference.h
@@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
// Let COND_RES(X, Y) be:
template <class _Xp, class _Yp>
-using __cond_res = decltype(false ? std::declval<_Xp (&)()>()() : std::declval<_Yp (&)()>()());
+using __cond_res [[__gnu__::__nodebug__]] = decltype(false ? std::declval<_Xp (&)()>()() : std::declval<_Yp (&)()>()());
// Let `XREF(A)` denote a unary alias template `T` such that `T<U>` denotes the same type as `U`
// with the addition of `A`'s cv and reference qualifiers, for a non-reference cv-unqualified type
@@ -39,7 +39,7 @@ using __cond_res = decltype(false ? std::declval<_Xp (&)()>()() : std::declval<_
template <class _Tp>
struct __xref {
template <class _Up>
- using __apply = __copy_cvref_t<_Tp, _Up>;
+ using __apply [[__gnu__::__nodebug__]] = __copy_cvref_t<_Tp, _Up>;
};
// Given types A and B, let X be remove_reference_t<A>, let Y be remove_reference_t<B>,
@@ -48,10 +48,10 @@ template <class _Ap, class _Bp, class _Xp = remove_reference_t<_Ap>, class _Yp =
struct __common_ref;
template <class _Xp, class _Yp>
-using __common_ref_t = typename __common_ref<_Xp, _Yp>::__type;
+using __common_ref_t [[__gnu__::__nodebug__]] = typename __common_ref<_Xp, _Yp>::__type;
template <class _Xp, class _Yp>
-using __cv_cond_res = __cond_res<__copy_cv_t<_Xp, _Yp>&, __copy_cv_t<_Yp, _Xp>&>;
+using __cv_cond_res [[__gnu__::__nodebug__]] = __cond_res<__copy_cv_t<_Xp, _Yp>&, __copy_cv_t<_Yp, _Xp>&>;
// If A and B are both lvalue reference types, COMMON-REF(A, B) is
// COND-RES(COPYCV(X, Y)&, COPYCV(Y, X)&) if that type exists and is a reference type.
@@ -61,13 +61,13 @@ template <class _Ap, class _Bp, class _Xp, class _Yp>
requires { typename __cv_cond_res<_Xp, _Yp>; } &&
is_reference_v<__cv_cond_res<_Xp, _Yp>>
struct __common_ref<_Ap&, _Bp&, _Xp, _Yp> {
- using __type = __cv_cond_res<_Xp, _Yp>;
+ using __type [[__gnu__::__nodebug__]] = __cv_cond_res<_Xp, _Yp>;
};
// clang-format on
// Otherwise, let C be remove_reference_t<COMMON-REF(X&, Y&)>&&. ...
template <class _Xp, class _Yp>
-using __common_ref_C = remove_reference_t<__common_ref_t<_Xp&, _Yp&>>&&;
+using __common_ref_C [[__gnu__::__nodebug__]] = remove_reference_t<__common_ref_t<_Xp&, _Yp&>>&&;
// .... If A and B are both rvalue reference types, C is well-formed, and
// is_convertible_v<A, C> && is_convertible_v<B, C> is true, then COMMON-REF(A, B) is C.
@@ -78,13 +78,13 @@ template <class _Ap, class _Bp, class _Xp, class _Yp>
is_convertible_v<_Ap&&, __common_ref_C<_Xp, _Yp>> &&
is_convertible_v<_Bp&&, __common_ref_C<_Xp, _Yp>>
struct __common_ref<_Ap&&, _Bp&&, _Xp, _Yp> {
- using __type = __common_ref_C<_Xp, _Yp>;
+ using __type [[__gnu__::__nodebug__]] = __common_ref_C<_Xp, _Yp>;
};
// clang-format on
// Otherwise, let D be COMMON-REF(const X&, Y&). ...
template <class _Tp, class _Up>
-using __common_ref_D = __common_ref_t<const _Tp&, _Up&>;
+using __common_ref_D [[__gnu__::__nodebug__]] = __common_ref_t<const _Tp&, _Up&>;
// ... If A is an rvalue reference and B is an lvalue reference and D is well-formed and
// is_convertible_v<A, D> is true, then COMMON-REF(A, B) is D.
@@ -94,7 +94,7 @@ template <class _Ap, class _Bp, class _Xp, class _Yp>
requires { typename __common_ref_D<_Xp, _Yp>; } &&
is_convertible_v<_Ap&&, __common_ref_D<_Xp, _Yp>>
struct __common_ref<_Ap&&, _Bp&, _Xp, _Yp> {
- using __type = __common_ref_D<_Xp, _Yp>;
+ using __type [[__gnu__::__nodebug__]] = __common_ref_D<_Xp, _Yp>;
};
// clang-format on
@@ -150,7 +150,7 @@ template <class, class, template <class> class, template <class> class>
struct basic_common_reference {};
template <class _Tp, class _Up>
-using __basic_common_reference_t =
+using __basic_common_reference_t [[__gnu__::__nodebug__]] =
typename basic_common_reference<remove_cvref_t<_Tp>,
remove_cvref_t<_Up>,
__xref<_Tp>::template __apply,
diff --git a/libcxx/include/__type_traits/common_type.h b/libcxx/include/__type_traits/common_type.h
index ef542f8bccfe02..f11c670d1f4009 100644
--- a/libcxx/include/__type_traits/common_type.h
+++ b/libcxx/include/__type_traits/common_type.h
@@ -31,7 +31,7 @@ template <class... _Args>
struct common_type;
template <class... _Args>
-using __common_type_t = typename common_type<_Args...>::type;
+using __common_type_t [[__gnu__::__nodebug__]] = typename common_type<_Args...>::type;
template <class... _Args>
struct common_type : __builtin_common_type<__common_type_t, __type_identity, __empty, _Args...> {};
diff --git a/libcxx/include/__type_traits/conjunction.h b/libcxx/include/__type_traits/conjunction.h
index c2995591bbc28f..21b26f66d4b60c 100644
--- a/libcxx/include/__type_traits/conjunction.h
+++ b/libcxx/include/__type_traits/conjunction.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class...>
-using __expand_to_true = true_type;
+using __expand_to_true [[__gnu__::__nodebug__]] = true_type;
template <class... _Pred>
__expand_to_true<__enable_if_t<_Pred::value>...> __and_helper(int);
diff --git a/libcxx/include/__type_traits/copy_cv.h b/libcxx/include/__type_traits/copy_cv.h
index d482cb42bffed9..5769c6078484ad 100644
--- a/libcxx/include/__type_traits/copy_cv.h
+++ b/libcxx/include/__type_traits/copy_cv.h
@@ -22,29 +22,29 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _From>
struct __copy_cv {
template <class _To>
- using __apply = _To;
+ using __apply [[__gnu__::__nodebug__]] = _To;
};
template <class _From>
struct __copy_cv<const _From> {
template <class _To>
- using __apply = const _To;
+ using __apply [[__gnu__::__nodebug__]] = const _To;
};
template <class _From>
struct __copy_cv<volatile _From> {
template <class _To>
- using __apply = volatile _To;
+ using __apply [[__gnu__::__nodebug__]] = volatile _To;
};
template <class _From>
struct __copy_cv<const volatile _From> {
template <class _To>
- using __apply = const volatile _To;
+ using __apply [[__gnu__::__nodebug__]] = const volatile _To;
};
template <class _From, class _To>
-using __copy_cv_t = typename __copy_cv<_From>::template __apply<_To>;
+using __copy_cv_t [[__gnu__::__nodebug__]] = typename __copy_cv<_From>::template __apply<_To>;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/copy_cvref.h b/libcxx/include/__type_traits/copy_cvref.h
index 8bbf8efdf44dea..dfd9a751e210ed 100644
--- a/libcxx/include/__type_traits/copy_cvref.h
+++ b/libcxx/include/__type_traits/copy_cvref.h
@@ -36,7 +36,7 @@ struct __copy_cvref<_From&&, _To> {
};
template <class _From, class _To>
-using __copy_cvref_t = typename __copy_cvref<_From, _To>::type;
+using __copy_cvref_t [[__gnu__::__nodebug__]] = typename __copy_cvref<_From, _To>::type;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/detected_or.h b/libcxx/include/__type_traits/detected_or.h
index 390f368411471e..e6d837ac3c0fd5 100644
--- a/libcxx/include/__type_traits/detected_or.h
+++ b/libcxx/include/__type_traits/detected_or.h
@@ -29,7 +29,7 @@ struct __detector<_Default, __void_t<_Op<_Args...> >, _Op, _Args...> {
};
template <class _Default, template <class...> class _Op, class... _Args>
-using __detected_or_t = typename __detector<_Default, void, _Op, _Args...>::type;
+using __detected_or_t [[__gnu__::__nodebug__]] = typename __detector<_Default, void, _Op, _Args...>::type;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/disjunction.h b/libcxx/include/__type_traits/disjunction.h
index 2c89528d9f2fc0..ec82ca4482992c 100644
--- a/libcxx/include/__type_traits/disjunction.h
+++ b/libcxx/include/__type_traits/disjunction.h
@@ -31,7 +31,7 @@ struct _OrImpl<true> {
template <>
struct _OrImpl<false> {
template <class _Res, class...>
- using _Result = _Res;
+ using _Result [[__gnu__::__nodebug__]] = _Res;
};
// _Or always performs lazy evaluation of its arguments.
diff --git a/libcxx/include/__type_traits/invoke.h b/libcxx/include/__type_traits/invoke.h
index 71db32ae6a3cef..b56fcf2c54422d 100644
--- a/libcxx/include/__type_traits/invoke.h
+++ b/libcxx/include/__type_traits/invoke.h
@@ -44,12 +44,12 @@ template <class _Fp,
class _DecayFp = __decay_t<_Fp>,
class _DecayA0 = __decay_t<_A0>,
class _ClassT = typename __member_pointer_class_type<_DecayFp>::type>
-using __enable_if_bullet1 =
+using __enable_if_bullet1 [[__gnu__::__nodebug__]] =
__enable_if_t<is_member_function_pointer<_DecayFp>::value &&
(is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value)>;
template <class _Fp, class _A0, class _DecayFp = __decay_t<_Fp>, class _DecayA0 = __decay_t<_A0> >
-using __enable_if_bullet2 =
+using __enable_if_bullet2 [[__gnu__::__nodebug__]] =
__enable_if_t<is_member_function_pointer<_DecayFp>::value && __is_reference_wrapper<_DecayA0>::value>;
template <class _Fp,
@@ -57,7 +57,7 @@ template <class _Fp,
class _DecayFp = __decay_t<_Fp>,
class _DecayA0 = __decay_t<_A0>,
class _ClassT = typename __member_pointer_class_type<_DecayFp>::type>
-using __enable_if_bullet3 =
+using __enable_if_bullet3 [[__gnu__::__nodebug__]] =
__enable_if_t<is_member_function_pointer<_DecayFp>::value &&
!(is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value) &&
!__is_reference_wrapper<_DecayA0>::value>;
@@ -67,12 +67,12 @@ template <class _Fp,
class _DecayFp = __decay_t<_Fp>,
class _DecayA0 = __decay_t<_A0>,
class _ClassT = typename __member_pointer_class_type<_DecayFp>::type>
-using __enable_if_bullet4 =
+using __enable_if_bullet4 [[__gnu__::__nodebug__]] =
__enable_if_t<is_member_object_pointer<_DecayFp>::value &&
(is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value)>;
template <class _Fp, class _A0, class _DecayFp = __decay_t<_Fp>, class _DecayA0 = __decay_t<_A0> >
-using __enable_if_bullet5 =
+using __enable_if_bullet5 [[__gnu__::__nodebug__]] =
__enable_if_t<is_member_object_pointer<_DecayFp>::value && __is_reference_wrapper<_DecayA0>::value>;
template <class _Fp,
@@ -80,7 +80,7 @@ template <class _Fp,
class _DecayFp = __decay_t<_Fp>,
class _DecayA0 = __decay_t<_A0>,
class _ClassT = typename __member_pointer_class_type<_DecayFp>::type>
-using __enable_if_bullet6 =
+using __enable_if_bullet6 [[__gnu__::__nodebug__]] =
__enable_if_t<is_member_object_pointer<_DecayFp>::value &&
!(is_same<_ClassT, _DecayA0>::value || is_base_of<_ClassT, _DecayA0>::value) &&
!__is_reference_wrapper<_DecayA0>::value>;
@@ -159,7 +159,7 @@ struct __invokable_r {
// FIXME: Check that _Ret, _Fp, and _Args... are all complete types, cv void,
// or incomplete array types as required by the standard.
- using _Result = decltype(__try_call<_Fp, _Args...>(0));
+ using _Result [[__gnu__::__nodebug__]] = decltype(__try_call<_Fp, _Args...>(0));
using type = __conditional_t<_IsNotSame<_Result, __nat>::value,
__conditional_t<is_void<_Ret>::value, true_type, __is_core_convertible<_Result, _Ret> >,
@@ -167,7 +167,7 @@ struct __invokable_r {
static const bool value = type::value;
};
template <class _Fp, class... _Args>
-using __invokable = __invokable_r<void, _Fp, _Args...>;
+using __invokable [[__gnu__::__nodebug__]] = __invokable_r<void, _Fp, _Args...>;
template <bool _IsInvokable, bool _IsCVVoid, class _Ret, class _Fp, class... _Args>
struct __nothrow_invokable_r_imp {
@@ -199,11 +199,12 @@ struct __nothrow_invokable_r_imp<true, true, _Ret, _Fp, _Args...> {
};
template <class _Ret, class _Fp, class... _Args>
-using __nothrow_invokable_r =
+using __nothrow_invokable_r [[__gnu__::__nodebug__]] =
__nothrow_invokable_r_imp<__invokable_r<_Ret, _Fp, _Args...>::value, is_void<_Ret>::value, _Ret, _Fp, _Args...>;
template <class _Fp, class... _Args>
-using __nothrow_invokable = __nothrow_invokable_r_imp<__invokable<_Fp, _Args...>::value, true, void, _Fp, _Args...>;
+using __nothrow_invokable [[__gnu__::__nodebug__]] =
+ __nothrow_invokable_r_imp<__invokable<_Fp, _Args...>::value, true, void, _Fp, _Args...>;
template <class _Fp, class... _Args>
struct __invoke_of
diff --git a/libcxx/include/__type_traits/is_always_bitcastable.h b/libcxx/include/__type_traits/is_always_bitcastable.h
index 5bc650b41358a8..f6afda596cd23d 100644
--- a/libcxx/include/__type_traits/is_always_bitcastable.h
+++ b/libcxx/include/__type_traits/is_always_bitcastable.h
@@ -31,8 +31,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// considered bit-castable.
template <class _From, class _To>
struct __is_always_bitcastable {
- using _UnqualFrom = __remove_cv_t<_From>;
- using _UnqualTo = __remove_cv_t<_To>;
+ using _UnqualFrom [[__gnu__::__nodebug__]] = __remove_cv_t<_From>;
+ using _UnqualTo [[__gnu__::__nodebug__]] = __remove_cv_t<_To>;
// clang-format off
static const bool value =
diff --git a/libcxx/include/__type_traits/is_char_like_type.h b/libcxx/include/__type_traits/is_char_like_type.h
index 26205843047ca2..c44db400eb2536 100644
--- a/libcxx/include/__type_traits/is_char_like_type.h
+++ b/libcxx/include/__type_traits/is_char_like_type.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT>
-using _IsCharLikeType = _And<is_standard_layout<_CharT>, is_trivial<_CharT> >;
+using _IsCharLikeType [[__gnu__::__nodebug__]] = _And<is_standard_layout<_CharT>, is_trivial<_CharT> >;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/is_equality_comparable.h b/libcxx/include/__type_traits/is_equality_comparable.h
index 4397f743e5ee95..5f60eea5f716ff 100644
--- a/libcxx/include/__type_traits/is_equality_comparable.h
+++ b/libcxx/include/__type_traits/is_equality_comparable.h
@@ -80,7 +80,7 @@ struct __libcpp_is_trivially_equality_comparable_impl<_Tp*, _Up*>
};
template <class _Tp, class _Up>
-using __libcpp_is_trivially_equality_comparable =
+using __libcpp_is_trivially_equality_comparable [[__gnu__::__nodebug__]] =
__libcpp_is_trivially_equality_comparable_impl<__remove_cv_t<_Tp>, __remove_cv_t<_Up> >;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/is_execution_policy.h b/libcxx/include/__type_traits/is_execution_policy.h
index 6884f17ba16c88..4dc6ec82db231c 100644
--- a/libcxx/include/__type_traits/is_execution_policy.h
+++ b/libcxx/include/__type_traits/is_execution_policy.h
@@ -50,7 +50,7 @@ __remove_parallel_policy(const _ExecutionPolicy& = _ExecutionPolicy{execution::_
// Removes the "parallel" part of an execution policy.
// For example, turns par_unseq into unseq, and par into seq.
template <class _ExecutionPolicy>
-using __remove_parallel_policy_t = decltype(std::__remove_parallel_policy<_ExecutionPolicy>());
+using __remove_parallel_policy_t [[__gnu__::__nodebug__]] = decltype(std::__remove_parallel_policy<_ExecutionPolicy>());
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/is_primary_template.h b/libcxx/include/__type_traits/is_primary_template.h
index f308dfadc8ec89..27552e6be1e332 100644
--- a/libcxx/include/__type_traits/is_primary_template.h
+++ b/libcxx/include/__type_traits/is_primary_template.h
@@ -21,10 +21,11 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-using __test_for_primary_template = __enable_if_t<_IsSame<_Tp, typename _Tp::__primary_template>::value>;
+using __test_for_primary_template [[__gnu__::__nodebug__]] =
+ __enable_if_t<_IsSame<_Tp, typename _Tp::__primary_template>::value>;
template <class _Tp>
-using __is_primary_template = _IsValidExpansion<__test_for_primary_template, _Tp>;
+using __is_primary_template [[__gnu__::__nodebug__]] = _IsValidExpansion<__test_for_primary_template, _Tp>;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/is_same.h b/libcxx/include/__type_traits/is_same.h
index 9561b7b5d6da3c..26e3eb1c220a8d 100644
--- a/libcxx/include/__type_traits/is_same.h
+++ b/libcxx/include/__type_traits/is_same.h
@@ -34,10 +34,10 @@ inline constexpr bool is_same_v = __is_same(_Tp, _Up);
// (such as in a dependent return type).
template <class _Tp, class _Up>
-using _IsSame = _BoolConstant<__is_same(_Tp, _Up)>;
+using _IsSame [[__gnu__::__nodebug__]] = _BoolConstant<__is_same(_Tp, _Up)>;
template <class _Tp, class _Up>
-using _IsNotSame = _BoolConstant<!__is_same(_Tp, _Up)>;
+using _IsNotSame [[__gnu__::__nodebug__]] = _BoolConstant<!__is_same(_Tp, _Up)>;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/is_swappable.h b/libcxx/include/__type_traits/is_swappable.h
index 221f017700a2e4..a06ecc9b9123f5 100644
--- a/libcxx/include/__type_traits/is_swappable.h
+++ b/libcxx/include/__type_traits/is_swappable.h
@@ -41,10 +41,11 @@ inline const bool __is_nothrow_swappable_v = __is_nothrow_swappable_with_v<_Tp&,
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp>
-using __swap_result_t = __enable_if_t<is_move_constructible<_Tp>::value && is_move_assignable<_Tp>::value>;
+using __swap_result_t [[__gnu__::__nodebug__]] =
+ __enable_if_t<is_move_constructible<_Tp>::value && is_move_assignable<_Tp>::value>;
#else
template <class>
-using __swap_result_t = void;
+using __swap_result_t [[__gnu__::__nodebug__]] = void;
#endif
template <class _Tp>
diff --git a/libcxx/include/__type_traits/make_32_64_or_128_bit.h b/libcxx/include/__type_traits/make_32_64_or_128_bit.h
index 70f84fcd18686c..0ab82f2048674b 100644
--- a/libcxx/include/__type_traits/make_32_64_or_128_bit.h
+++ b/libcxx/include/__type_traits/make_32_64_or_128_bit.h
@@ -31,7 +31,7 @@ template <class _Tp>
requires(is_signed_v<_Tp> || is_unsigned_v<_Tp> || is_same_v<_Tp, char>)
#endif
// clang-format off
-using __make_32_64_or_128_bit_t =
+using __make_32_64_or_128_bit_t [[__gnu__::__nodebug__]] =
__copy_unsigned_t<_Tp,
__conditional_t<sizeof(_Tp) <= sizeof(int32_t), int32_t,
__conditional_t<sizeof(_Tp) <= sizeof(int64_t), int64_t,
diff --git a/libcxx/include/__type_traits/make_const_lvalue_ref.h b/libcxx/include/__type_traits/make_const_lvalue_ref.h
index 469d4cb31ef7d6..e75602665ac1b8 100644
--- a/libcxx/include/__type_traits/make_const_lvalue_ref.h
+++ b/libcxx/include/__type_traits/make_const_lvalue_ref.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-using __make_const_lvalue_ref = const __libcpp_remove_reference_t<_Tp>&;
+using __make_const_lvalue_ref [[__gnu__::__nodebug__]] = const __libcpp_remove_reference_t<_Tp>&;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/make_signed.h b/libcxx/include/__type_traits/make_signed.h
index 8070690b3a7a90..e4ef1c1de96945 100644
--- a/libcxx/include/__type_traits/make_signed.h
+++ b/libcxx/include/__type_traits/make_signed.h
@@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__make_signed)
template <class _Tp>
-using __make_signed_t = __make_signed(_Tp);
+using __make_signed_t [[__gnu__::__nodebug__]] = __make_signed(_Tp);
#else
// clang-format off
diff --git a/libcxx/include/__type_traits/make_unsigned.h b/libcxx/include/__type_traits/make_unsigned.h
index 562f7bab8a7fbf..cab954e704b86f 100644
--- a/libcxx/include/__type_traits/make_unsigned.h
+++ b/libcxx/include/__type_traits/make_unsigned.h
@@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__make_unsigned)
template <class _Tp>
-using __make_unsigned_t = __make_unsigned(_Tp);
+using __make_unsigned_t [[__gnu__::__nodebug__]] = __make_unsigned(_Tp);
#else
// clang-format off
@@ -92,7 +92,8 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __make_unsigned_t<_Tp> __to_unsigned_lik
}
template <class _Tp, class _Up>
-using __copy_unsigned_t = __conditional_t<is_unsigned<_Tp>::value, __make_unsigned_t<_Up>, _Up>;
+using __copy_unsigned_t [[__gnu__::__nodebug__]] =
+ __conditional_t<is_unsigned<_Tp>::value, __make_unsigned_t<_Up>, _Up>;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/maybe_const.h b/libcxx/include/__type_traits/maybe_const.h
index 25fba58fb77303..7715a25c044297 100644
--- a/libcxx/include/__type_traits/maybe_const.h
+++ b/libcxx/include/__type_traits/maybe_const.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <bool _Const, class _Tp>
-using __maybe_const = __conditional_t<_Const, const _Tp, _Tp>;
+using __maybe_const [[__gnu__::__nodebug__]] = __conditional_t<_Const, const _Tp, _Tp>;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/remove_all_extents.h b/libcxx/include/__type_traits/remove_all_extents.h
index db7dab4a6c1322..fe72f82b765b49 100644
--- a/libcxx/include/__type_traits/remove_all_extents.h
+++ b/libcxx/include/__type_traits/remove_all_extents.h
@@ -25,7 +25,7 @@ struct remove_all_extents {
};
template <class _Tp>
-using __remove_all_extents_t = __remove_all_extents(_Tp);
+using __remove_all_extents_t [[__gnu__::__nodebug__]] = __remove_all_extents(_Tp);
#else
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS remove_all_extents {
diff --git a/libcxx/include/__type_traits/remove_const.h b/libcxx/include/__type_traits/remove_const.h
index a3f0648c478506..7ac4d5b8f20d76 100644
--- a/libcxx/include/__type_traits/remove_const.h
+++ b/libcxx/include/__type_traits/remove_const.h
@@ -24,7 +24,7 @@ struct remove_const {
};
template <class _Tp>
-using __remove_const_t = __remove_const(_Tp);
+using __remove_const_t [[__gnu__::__nodebug__]] = __remove_const(_Tp);
#else
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS remove_const {
diff --git a/libcxx/include/__type_traits/remove_const_ref.h b/libcxx/include/__type_traits/remove_const_ref.h
index d3b334935a5b15..3108bff61e2a2c 100644
--- a/libcxx/include/__type_traits/remove_const_ref.h
+++ b/libcxx/include/__type_traits/remove_const_ref.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-using __remove_const_ref_t = __remove_const_t<__libcpp_remove_reference_t<_Tp> >;
+using __remove_const_ref_t [[__gnu__::__nodebug__]] = __remove_const_t<__libcpp_remove_reference_t<_Tp> >;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/remove_cv.h b/libcxx/include/__type_traits/remove_cv.h
index 50e9f3e8aa78d6..6bc471739574bd 100644
--- a/libcxx/include/__type_traits/remove_cv.h
+++ b/libcxx/include/__type_traits/remove_cv.h
@@ -24,10 +24,10 @@ struct remove_cv {
#if defined(_LIBCPP_COMPILER_GCC)
template <class _Tp>
-using __remove_cv_t = typename remove_cv<_Tp>::type;
+using __remove_cv_t [[__gnu__::__nodebug__]] = typename remove_cv<_Tp>::type;
#else
template <class _Tp>
-using __remove_cv_t = __remove_cv(_Tp);
+using __remove_cv_t [[__gnu__::__nodebug__]] = __remove_cv(_Tp);
#endif
#if _LIBCPP_STD_VER >= 14
diff --git a/libcxx/include/__type_traits/remove_cvref.h b/libcxx/include/__type_traits/remove_cvref.h
index 55f894dbd1d815..b8800bd8983714 100644
--- a/libcxx/include/__type_traits/remove_cvref.h
+++ b/libcxx/include/__type_traits/remove_cvref.h
@@ -34,7 +34,7 @@ using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp);
#endif // __has_builtin(__remove_cvref)
template <class _Tp, class _Up>
-using __is_same_uncvref = _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> >;
+using __is_same_uncvref [[__gnu__::__nodebug__]] = _IsSame<__remove_cvref_t<_Tp>, __remove_cvref_t<_Up> >;
#if _LIBCPP_STD_VER >= 20
template <class _Tp>
diff --git a/libcxx/include/__type_traits/remove_extent.h b/libcxx/include/__type_traits/remove_extent.h
index aceeb47069660b..8e3221aa634ac8 100644
--- a/libcxx/include/__type_traits/remove_extent.h
+++ b/libcxx/include/__type_traits/remove_extent.h
@@ -25,7 +25,7 @@ struct remove_extent {
};
template <class _Tp>
-using __remove_extent_t = __remove_extent(_Tp);
+using __remove_extent_t [[__gnu__::__nodebug__]] = __remove_extent(_Tp);
#else
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS remove_extent {
diff --git a/libcxx/include/__type_traits/remove_pointer.h b/libcxx/include/__type_traits/remove_pointer.h
index 1048f67055a287..b577a4611da8ca 100644
--- a/libcxx/include/__type_traits/remove_pointer.h
+++ b/libcxx/include/__type_traits/remove_pointer.h
@@ -25,10 +25,10 @@ struct remove_pointer {
# ifdef _LIBCPP_COMPILER_GCC
template <class _Tp>
-using __remove_pointer_t = typename remove_pointer<_Tp>::type;
+using __remove_pointer_t [[__gnu__::__nodebug__]] = typename remove_pointer<_Tp>::type;
# else
template <class _Tp>
-using __remove_pointer_t = __remove_pointer(_Tp);
+using __remove_pointer_t [[__gnu__::__nodebug__]] = __remove_pointer(_Tp);
# endif
#else
// clang-format off
diff --git a/libcxx/include/__type_traits/remove_reference.h b/libcxx/include/__type_traits/remove_reference.h
index ba67891758adce..cb0366273c9b0c 100644
--- a/libcxx/include/__type_traits/remove_reference.h
+++ b/libcxx/include/__type_traits/remove_reference.h
@@ -24,7 +24,7 @@ struct remove_reference {
};
template <class _Tp>
-using __libcpp_remove_reference_t = __remove_reference_t(_Tp);
+using __libcpp_remove_reference_t [[__gnu__::__nodebug__]] = __remove_reference_t(_Tp);
#elif __has_builtin(__remove_reference)
template <class _Tp>
struct remove_reference {
diff --git a/libcxx/include/__type_traits/remove_volatile.h b/libcxx/include/__type_traits/remove_volatile.h
index 7600ae0ec5167e..261db542580bef 100644
--- a/libcxx/include/__type_traits/remove_volatile.h
+++ b/libcxx/include/__type_traits/remove_volatile.h
@@ -24,7 +24,7 @@ struct remove_volatile {
};
template <class _Tp>
-using __remove_volatile_t = __remove_volatile(_Tp);
+using __remove_volatile_t [[__gnu__::__nodebug__]] = __remove_volatile(_Tp);
#else
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS remove_volatile {
diff --git a/libcxx/include/__type_traits/void_t.h b/libcxx/include/__type_traits/void_t.h
index 985bba02e72f77..de52141e816777 100644
--- a/libcxx/include/__type_traits/void_t.h
+++ b/libcxx/include/__type_traits/void_t.h
@@ -23,7 +23,7 @@ using void_t = void;
#endif
template <class...>
-using __void_t = void;
+using __void_t [[__gnu__::__nodebug__]] = void;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__utility/exception_guard.h b/libcxx/include/__utility/exception_guard.h
index a03bd7e8f35227..ef674ac0e5de9b 100644
--- a/libcxx/include/__utility/exception_guard.h
+++ b/libcxx/include/__utility/exception_guard.h
@@ -126,10 +126,10 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(__exception_guard_noexceptions);
#if !_LIBCPP_HAS_EXCEPTIONS
template <class _Rollback>
-using __exception_guard = __exception_guard_noexceptions<_Rollback>;
+using __exception_guard [[__gnu__::__nodebug__]] = __exception_guard_noexceptions<_Rollback>;
#else
template <class _Rollback>
-using __exception_guard = __exception_guard_exceptions<_Rollback>;
+using __exception_guard [[__gnu__::__nodebug__]] = __exception_guard_exceptions<_Rollback>;
#endif
template <class _Rollback>
diff --git a/libcxx/include/__utility/forward_like.h b/libcxx/include/__utility/forward_like.h
index 0206ce23a56681..4f93996162ae50 100644
--- a/libcxx/include/__utility/forward_like.h
+++ b/libcxx/include/__utility/forward_like.h
@@ -25,17 +25,18 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 23
template <class _Ap, class _Bp>
-using _CopyConst = _If<is_const_v<_Ap>, const _Bp, _Bp>;
+using _CopyConst [[__gnu__::__nodebug__]] = _If<is_const_v<_Ap>, const _Bp, _Bp>;
template <class _Ap, class _Bp>
-using _OverrideRef = _If<is_rvalue_reference_v<_Ap>, remove_reference_t<_Bp>&&, _Bp&>;
+using _OverrideRef [[__gnu__::__nodebug__]] = _If<is_rvalue_reference_v<_Ap>, remove_reference_t<_Bp>&&, _Bp&>;
template <class _Ap, class _Bp>
-using _ForwardLike = _OverrideRef<_Ap&&, _CopyConst<remove_reference_t<_Ap>, remove_reference_t<_Bp>>>;
+using _ForwardLike [[__gnu__::__nodebug__]] =
+ _OverrideRef<_Ap&&, _CopyConst<remove_reference_t<_Ap>, remove_reference_t<_Bp>>>;
template <class _Tp, class _Up>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto
-forward_like(_LIBCPP_LIFETIMEBOUND _Up&& __ux) noexcept -> _ForwardLike<_Tp, _Up> {
+[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto forward_like(_LIBCPP_LIFETIMEBOUND _Up&& __ux) noexcept
+ -> _ForwardLike<_Tp, _Up> {
return static_cast<_ForwardLike<_Tp, _Up>>(__ux);
}
diff --git a/libcxx/include/__utility/in_place.h b/libcxx/include/__utility/in_place.h
index edaa4e02c55f54..7be95f1bef24ec 100644
--- a/libcxx/include/__utility/in_place.h
+++ b/libcxx/include/__utility/in_place.h
@@ -47,7 +47,7 @@ template <class _Tp>
struct __is_inplace_type_imp<in_place_type_t<_Tp>> : true_type {};
template <class _Tp>
-using __is_inplace_type = __is_inplace_type_imp<__remove_cvref_t<_Tp>>;
+using __is_inplace_type [[__gnu__::__nodebug__]] = __is_inplace_type_imp<__remove_cvref_t<_Tp>>;
template <class _Tp>
struct __is_inplace_index_imp : false_type {};
@@ -55,7 +55,7 @@ template <size_t _Idx>
struct __is_inplace_index_imp<in_place_index_t<_Idx>> : true_type {};
template <class _Tp>
-using __is_inplace_index = __is_inplace_index_imp<__remove_cvref_t<_Tp>>;
+using __is_inplace_index [[__gnu__::__nodebug__]] = __is_inplace_index_imp<__remove_cvref_t<_Tp>>;
#endif // _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__utility/integer_sequence.h b/libcxx/include/__utility/integer_sequence.h
index 35eb606ee37f67..cdc51c6494a633 100644
--- a/libcxx/include/__utility/integer_sequence.h
+++ b/libcxx/include/__utility/integer_sequence.h
@@ -25,19 +25,19 @@ struct __tuple_indices;
template <class _IdxType, _IdxType... _Values>
struct __integer_sequence {
template <template <class _OIdxType, _OIdxType...> class _ToIndexSeq, class _ToIndexType>
- using __convert = _ToIndexSeq<_ToIndexType, _Values...>;
+ using __convert [[__gnu__::__nodebug__]] = _ToIndexSeq<_ToIndexType, _Values...>;
template <size_t _Sp>
- using __to_tuple_indices = __tuple_indices<(_Values + _Sp)...>;
+ using __to_tuple_indices [[__gnu__::__nodebug__]] = __tuple_indices<(_Values + _Sp)...>;
};
#if __has_builtin(__make_integer_seq)
template <size_t _Ep, size_t _Sp>
-using __make_indices_imp =
+using __make_indices_imp [[__gnu__::__nodebug__]] =
typename __make_integer_seq<__integer_sequence, size_t, _Ep - _Sp>::template __to_tuple_indices<_Sp>;
#elif __has_builtin(__integer_pack)
template <size_t _Ep, size_t _Sp>
-using __make_indices_imp =
+using __make_indices_imp [[__gnu__::__nodebug__]] =
typename __integer_sequence<size_t, __integer_pack(_Ep - _Sp)...>::template __to_tuple_indices<_Sp>;
#else
# error "No known way to get an integer pack from the compiler"
diff --git a/libcxx/include/__utility/move.h b/libcxx/include/__utility/move.h
index 66aec5aa26d828..1acc6244897a0d 100644
--- a/libcxx/include/__utility/move.h
+++ b/libcxx/include/__utility/move.h
@@ -33,7 +33,7 @@ move(_LIBCPP_LIFETIMEBOUND _Tp&& __t) _NOEXCEPT {
}
template <class _Tp>
-using __move_if_noexcept_result_t =
+using __move_if_noexcept_result_t [[__gnu__::__nodebug__]] =
__conditional_t<!is_nothrow_move_constructible<_Tp>::value && is_copy_constructible<_Tp>::value, const _Tp&, _Tp&&>;
template <class _Tp>
diff --git a/libcxx/include/__utility/pair.h b/libcxx/include/__utility/pair.h
index f9d0f4e4723113..fa941ac17c6bde 100644
--- a/libcxx/include/__utility/pair.h
+++ b/libcxx/include/__utility/pair.h
@@ -71,7 +71,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
_T1 first;
_T2 second;
- using __trivially_relocatable =
+ using __trivially_relocatable [[__gnu__::__nodebug__]] =
__conditional_t<__libcpp_is_trivially_relocatable<_T1>::value && __libcpp_is_trivially_relocatable<_T2>::value,
pair,
void>;
diff --git a/libcxx/include/__utility/swap.h b/libcxx/include/__utility/swap.h
index 666d6d50f0d916..ba33368e6e9001 100644
--- a/libcxx/include/__utility/swap.h
+++ b/libcxx/include/__utility/swap.h
@@ -31,10 +31,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp>
-using __swap_result_t = __enable_if_t<is_move_constructible<_Tp>::value && is_move_assignable<_Tp>::value>;
+using __swap_result_t [[__gnu__::__nodebug__]] =
+ __enable_if_t<is_move_constructible<_Tp>::value && is_move_assignable<_Tp>::value>;
#else
template <class>
-using __swap_result_t = void;
+using __swap_result_t [[__gnu__::__nodebug__]] = void;
#endif
template <class _Tp>
diff --git a/libcxx/include/__vector/vector.h b/libcxx/include/__vector/vector.h
index 6ba7ba7bcf724b..9b54dc4936a165 100644
--- a/libcxx/include/__vector/vector.h
+++ b/libcxx/include/__vector/vector.h
@@ -114,7 +114,7 @@ class _LIBCPP_TEMPLATE_VIS vector {
// - pointer: may be trivially relocatable, so it's checked
// - allocator_type: may be trivially relocatable, so it's checked
// vector doesn't contain any self-references, so it's trivially relocatable if its members are.
- using __trivially_relocatable = __conditional_t<
+ using __trivially_relocatable [[__gnu__::__nodebug__]] = __conditional_t<
__libcpp_is_trivially_relocatable<pointer>::value && __libcpp_is_trivially_relocatable<allocator_type>::value,
vector,
void>;
diff --git a/libcxx/include/any b/libcxx/include/any
index cae56fa376e057..a25b69b2389d75 100644
--- a/libcxx/include/any
+++ b/libcxx/include/any
@@ -146,11 +146,11 @@ _LIBCPP_HIDE_FROM_ABI add_pointer_t<_ValueType> any_cast(any*) _NOEXCEPT;
namespace __any_imp {
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
-using _Buffer = aligned_storage_t<3 * sizeof(void*), alignof(void*)>;
+using _Buffer [[__gnu__::__nodebug__]] = aligned_storage_t<3 * sizeof(void*), alignof(void*)>;
_LIBCPP_SUPPRESS_DEPRECATED_POP
template <class _Tp>
-using _IsSmallObject =
+using _IsSmallObject [[__gnu__::__nodebug__]] =
integral_constant<bool,
sizeof(_Tp) <= sizeof(_Buffer) && alignof(_Buffer) % alignof(_Tp) == 0 &&
is_nothrow_move_constructible<_Tp>::value >;
@@ -182,7 +182,8 @@ inline _LIBCPP_HIDE_FROM_ABI bool __compare_typeid(type_info const* __id, const
}
template <class _Tp>
-using _Handler = conditional_t< _IsSmallObject<_Tp>::value, _SmallHandler<_Tp>, _LargeHandler<_Tp>>;
+using _Handler [[__gnu__::__nodebug__]] =
+ conditional_t< _IsSmallObject<_Tp>::value, _SmallHandler<_Tp>, _LargeHandler<_Tp>>;
} // namespace __any_imp
@@ -275,8 +276,9 @@ public:
# endif
private:
- typedef __any_imp::_Action _Action;
- using _HandleFuncPtr = void* (*)(_Action, any const*, any*, const type_info*, const void* __fallback_info);
+ using _Action [[__gnu__::__nodebug__]] = __any_imp::_Action;
+ using _HandleFuncPtr
+ [[__gnu__::__nodebug__]] = void* (*)(_Action, any const*, any*, const type_info*, const void* __fallback_info);
union _Storage {
_LIBCPP_HIDE_FROM_ABI constexpr _Storage() : __ptr(nullptr) {}
diff --git a/libcxx/include/array b/libcxx/include/array
index 99b38d049e129d..887df189820d48 100644
--- a/libcxx/include/array
+++ b/libcxx/include/array
@@ -170,15 +170,16 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, size_t _Size>
struct _LIBCPP_TEMPLATE_VIS array {
- using __trivially_relocatable = __conditional_t<__libcpp_is_trivially_relocatable<_Tp>::value, array, void>;
+ using __trivially_relocatable [[__gnu__::__nodebug__]] =
+ __conditional_t<__libcpp_is_trivially_relocatable<_Tp>::value, array, void>;
// types:
- using __self = array;
- using value_type = _Tp;
- using reference = value_type&;
- using const_reference = const value_type&;
- using pointer = value_type*;
- using const_pointer = const value_type*;
+ using __self [[__gnu__::__nodebug__]] = array;
+ using value_type = _Tp;
+ using reference = value_type&;
+ using const_reference = const value_type&;
+ using pointer = value_type*;
+ using const_pointer = const value_type*;
#if defined(_LIBCPP_ABI_BOUNDED_ITERATORS_IN_STD_ARRAY)
using iterator = __static_bounded_iter<pointer, _Size>;
using const_iterator = __static_bounded_iter<const_pointer, _Size>;
@@ -296,12 +297,12 @@ struct _LIBCPP_TEMPLATE_VIS array {
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> {
// types:
- using __self = array;
- using value_type = _Tp;
- using reference = value_type&;
- using const_reference = const value_type&;
- using pointer = value_type*;
- using const_pointer = const value_type*;
+ using __self [[__gnu__::__nodebug__]] = array;
+ using value_type = _Tp;
+ using reference = value_type&;
+ using const_reference = const value_type&;
+ using pointer = value_type*;
+ using const_pointer = const value_type*;
#if defined(_LIBCPP_ABI_BOUNDED_ITERATORS_IN_STD_ARRAY)
using iterator = __static_bounded_iter<pointer, 0>;
using const_iterator = __static_bounded_iter<const_pointer, 0>;
@@ -317,7 +318,7 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> {
using reverse_iterator = std::reverse_iterator<iterator>;
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
- using _EmptyType = __conditional_t<is_const<_Tp>::value, const __empty, __empty>;
+ using _EmptyType [[__gnu__::__nodebug__]] = __conditional_t<is_const<_Tp>::value, const __empty, __empty>;
struct _ArrayInStructT {
_Tp __data_[1];
diff --git a/libcxx/include/barrier b/libcxx/include/barrier
index 980eae06ab140f..937bd7f885ae72 100644
--- a/libcxx/include/barrier
+++ b/libcxx/include/barrier
@@ -92,7 +92,7 @@ It looks different from literature pseudocode for two main reasons:
*/
-using __barrier_phase_t = uint8_t;
+using __barrier_phase_t [[__gnu__::__nodebug__]] = uint8_t;
class __barrier_algorithm_base;
diff --git a/libcxx/include/ccomplex b/libcxx/include/ccomplex
index d379c9e7f0174a..22bcaf18d4c0e4 100644
--- a/libcxx/include/ccomplex
+++ b/libcxx/include/ccomplex
@@ -25,13 +25,14 @@
#if _LIBCPP_STD_VER >= 20
-using __standard_header_ccomplex _LIBCPP_DEPRECATED_("removed in C++20. Include <complex> instead.") = void;
-using __use_standard_header_ccomplex = __standard_header_ccomplex;
+using __standard_header_ccomplex _LIBCPP_DEPRECATED_("removed in C++20. Include <complex> instead.")
+ [[__gnu__::__nodebug__]] = void;
+using __use_standard_header_ccomplex [[__gnu__::__nodebug__]] = __standard_header_ccomplex;
#elif _LIBCPP_STD_VER >= 17
-using __standard_header_ccomplex _LIBCPP_DEPRECATED_("Include <complex> instead.") = void;
-using __use_standard_header_ccomplex = __standard_header_ccomplex;
+using __standard_header_ccomplex _LIBCPP_DEPRECATED_("Include <complex> instead.") [[__gnu__::__nodebug__]] = void;
+using __use_standard_header_ccomplex [[__gnu__::__nodebug__]] = __standard_header_ccomplex;
#endif
diff --git a/libcxx/include/ciso646 b/libcxx/include/ciso646
index 5fcac79e38a7f2..e1c1ac11206ed4 100644
--- a/libcxx/include/ciso646
+++ b/libcxx/include/ciso646
@@ -23,8 +23,9 @@
#if _LIBCPP_STD_VER >= 20
-using __standard_header_ciso646 _LIBCPP_DEPRECATED_("removed in C++20. Include <version> instead.") = void;
-using __use_standard_header_ciso646 = __standard_header_ciso646;
+using __standard_header_ciso646 _LIBCPP_DEPRECATED_("removed in C++20. Include <version> instead.")
+ [[__gnu__::__nodebug__]] = void;
+using __use_standard_header_ciso646 [[__gnu__::__nodebug__]] = __standard_header_ciso646;
#endif
diff --git a/libcxx/include/complex b/libcxx/include/complex
index 2dc6d298e44f69..b8e017e467bd13 100644
--- a/libcxx/include/complex
+++ b/libcxx/include/complex
@@ -397,7 +397,7 @@ class _LIBCPP_TEMPLATE_VIS complex<long double>;
struct __from_builtin_tag {};
template <class _Tp>
-using __complex_t =
+using __complex_t [[__gnu__::__nodebug__]] =
__conditional_t<is_same<_Tp, float>::value,
_Complex float,
__conditional_t<is_same<_Tp, double>::value, _Complex double, _Complex long double> >;
diff --git a/libcxx/include/cstdalign b/libcxx/include/cstdalign
index e6a2a3c7177422..ea63c20492e99e 100644
--- a/libcxx/include/cstdalign
+++ b/libcxx/include/cstdalign
@@ -42,13 +42,13 @@ Macros:
#if _LIBCPP_STD_VER >= 20
-using __standard_header_cstdalign _LIBCPP_DEPRECATED_("removed in C++20.") = void;
-using __use_standard_header_cstdalign = __standard_header_cstdalign;
+using __standard_header_cstdalign _LIBCPP_DEPRECATED_("removed in C++20.") [[__gnu__::__nodebug__]] = void;
+using __use_standard_header_cstdalign [[__gnu__::__nodebug__]] = __standard_header_cstdalign;
#elif _LIBCPP_STD_VER >= 17
-using __standard_header_cstdalign _LIBCPP_DEPRECATED = void;
-using __use_standard_header_cstdalign = __standard_header_cstdalign;
+using __standard_header_cstdalign _LIBCPP_DEPRECATED [[__gnu__::__nodebug__]] = void;
+using __use_standard_header_cstdalign [[__gnu__::__nodebug__]] = __standard_header_cstdalign;
#endif
diff --git a/libcxx/include/cstdbool b/libcxx/include/cstdbool
index 1d627258e10c09..c702016faa57f1 100644
--- a/libcxx/include/cstdbool
+++ b/libcxx/include/cstdbool
@@ -30,13 +30,13 @@ Macros:
#if _LIBCPP_STD_VER >= 20
-using __standard_header_cstdbool _LIBCPP_DEPRECATED_("removed in C++20.") = void;
-using __use_standard_header_cstdbool = __standard_header_cstdbool;
+using __standard_header_cstdbool _LIBCPP_DEPRECATED_("removed in C++20.") [[__gnu__::__nodebug__]] = void;
+using __use_standard_header_cstdbool [[__gnu__::__nodebug__]] = __standard_header_cstdbool;
#elif _LIBCPP_STD_VER >= 17
-using __standard_header_cstdbool _LIBCPP_DEPRECATED = void;
-using __use_standard_header_cstdbool = __standard_header_cstdbool;
+using __standard_header_cstdbool _LIBCPP_DEPRECATED [[__gnu__::__nodebug__]] = void;
+using __use_standard_header_cstdbool [[__gnu__::__nodebug__]] = __standard_header_cstdbool;
#endif
diff --git a/libcxx/include/ctgmath b/libcxx/include/ctgmath
index 7dbe952f021b74..c6ef6eb8db48ed 100644
--- a/libcxx/include/ctgmath
+++ b/libcxx/include/ctgmath
@@ -27,13 +27,15 @@
#if _LIBCPP_STD_VER >= 20
-using __standard_header_ctgmath _LIBCPP_DEPRECATED_("removed in C++20. Include <cmath> and <complex> instead.") = void;
-using __use_standard_header_ctgmath = __standard_header_ctgmath;
+using __standard_header_ctgmath _LIBCPP_DEPRECATED_("removed in C++20. Include <cmath> and <complex> instead.")
+ [[__gnu__::__nodebug__]] = void;
+using __use_standard_header_ctgmath [[__gnu__::__nodebug__]] = __standard_header_ctgmath;
#elif _LIBCPP_STD_VER >= 17
-using __standard_header_ctgmath _LIBCPP_DEPRECATED_("Include <cmath> and <complex> instead.") = void;
-using __use_standard_header_ctgmath = __standard_header_ctgmath;
+using __standard_header_ctgmath _LIBCPP_DEPRECATED_("Include <cmath> and <complex> instead.")
+ [[__gnu__::__nodebug__]] = void;
+using __use_standard_header_ctgmath [[__gnu__::__nodebug__]] = __standard_header_ctgmath;
#endif
diff --git a/libcxx/include/deque b/libcxx/include/deque
index ad667503489741..5aa0bd7fc87d1b 100644
--- a/libcxx/include/deque
+++ b/libcxx/include/deque
@@ -453,12 +453,13 @@ template <class _ValueType, class _Pointer, class _Reference, class _MapPointer,
struct __segmented_iterator_traits<
__deque_iterator<_ValueType, _Pointer, _Reference, _MapPointer, _DiffType, _BlockSize> > {
private:
- using _Iterator = __deque_iterator<_ValueType, _Pointer, _Reference, _MapPointer, _DiffType, _BlockSize>;
+ using _Iterator [[__gnu__::__nodebug__]] =
+ __deque_iterator<_ValueType, _Pointer, _Reference, _MapPointer, _DiffType, _BlockSize>;
public:
- using __is_segmented_iterator = true_type;
- using __segment_iterator = _MapPointer;
- using __local_iterator = _Pointer;
+ using __is_segmented_iterator [[__gnu__::__nodebug__]] = true_type;
+ using __segment_iterator [[__gnu__::__nodebug__]] = _MapPointer;
+ using __local_iterator [[__gnu__::__nodebug__]] = _Pointer;
static _LIBCPP_HIDE_FROM_ABI __segment_iterator __segment(_Iterator __iter) { return __iter.__m_iter_; }
static _LIBCPP_HIDE_FROM_ABI __local_iterator __local(_Iterator __iter) { return __iter.__ptr_; }
@@ -488,8 +489,8 @@ public:
using value_type = _Tp;
- using allocator_type = _Allocator;
- using __alloc_traits = allocator_traits<allocator_type>;
+ using allocator_type = _Allocator;
+ using __alloc_traits [[__gnu__::__nodebug__]] = allocator_traits<allocator_type>;
static_assert(__check_valid_allocator<allocator_type>::value, "");
static_assert(is_same<typename allocator_type::value_type, value_type>::value,
"Allocator::value_type must be same type as value_type");
@@ -500,13 +501,14 @@ public:
using pointer = typename __alloc_traits::pointer;
using const_pointer = typename __alloc_traits::const_pointer;
- using __pointer_allocator = __rebind_alloc<__alloc_traits, pointer>;
- using __const_pointer_allocator = __rebind_alloc<__alloc_traits, const_pointer>;
- using __map = __split_buffer<pointer, __pointer_allocator>;
- using __map_alloc_traits = allocator_traits<__pointer_allocator>;
- using __map_pointer = typename __map_alloc_traits::pointer;
- using __map_const_pointer = typename allocator_traits<__const_pointer_allocator>::const_pointer;
- using __map_const_iterator = typename __map::const_iterator;
+ using __pointer_allocator [[__gnu__::__nodebug__]] = __rebind_alloc<__alloc_traits, pointer>;
+ using __const_pointer_allocator [[__gnu__::__nodebug__]] = __rebind_alloc<__alloc_traits, const_pointer>;
+ using __map [[__gnu__::__nodebug__]] = __split_buffer<pointer, __pointer_allocator>;
+ using __map_alloc_traits [[__gnu__::__nodebug__]] = allocator_traits<__pointer_allocator>;
+ using __map_pointer [[__gnu__::__nodebug__]] = typename __map_alloc_traits::pointer;
+ using __map_const_pointer [[__gnu__::__nodebug__]] =
+ typename allocator_traits<__const_pointer_allocator>::const_pointer;
+ using __map_const_iterator [[__gnu__::__nodebug__]] = typename __map::const_iterator;
using reference = value_type&;
using const_reference = const value_type&;
@@ -522,7 +524,7 @@ public:
// - size_type: is always trivially relocatable, since it is required to be an integral type
// - allocator_type: may not be trivially relocatable, so it's checked
// None of these are referencing the `deque` itself, so if all of them are trivially relocatable, `deque` is too.
- using __trivially_relocatable = __conditional_t<
+ using __trivially_relocatable [[__gnu__::__nodebug__]] = __conditional_t<
__libcpp_is_trivially_relocatable<__map>::value && __libcpp_is_trivially_relocatable<allocator_type>::value,
deque,
void>;
diff --git a/libcxx/include/experimental/__simd/scalar.h b/libcxx/include/experimental/__simd/scalar.h
index da318d2f4650fd..6f91ef70eee8d0 100644
--- a/libcxx/include/experimental/__simd/scalar.h
+++ b/libcxx/include/experimental/__simd/scalar.h
@@ -49,8 +49,8 @@ struct __mask_storage<_Tp, simd_abi::__scalar> : __simd_storage<bool, simd_abi::
template <class _Tp>
struct __simd_operations<_Tp, simd_abi::__scalar> {
- using _SimdStorage = __simd_storage<_Tp, simd_abi::__scalar>;
- using _MaskStorage = __mask_storage<_Tp, simd_abi::__scalar>;
+ using _SimdStorage [[__gnu__::__nodebug__]] = __simd_storage<_Tp, simd_abi::__scalar>;
+ using _MaskStorage [[__gnu__::__nodebug__]] = __mask_storage<_Tp, simd_abi::__scalar>;
static _LIBCPP_HIDE_FROM_ABI _SimdStorage __broadcast(_Tp __v) noexcept { return {__v}; }
@@ -86,7 +86,7 @@ struct __simd_operations<_Tp, simd_abi::__scalar> {
template <class _Tp>
struct __mask_operations<_Tp, simd_abi::__scalar> {
- using _MaskStorage = __mask_storage<_Tp, simd_abi::__scalar>;
+ using _MaskStorage [[__gnu__::__nodebug__]] = __mask_storage<_Tp, simd_abi::__scalar>;
static _LIBCPP_HIDE_FROM_ABI _MaskStorage __broadcast(bool __v) noexcept { return {__v}; }
diff --git a/libcxx/include/experimental/__simd/simd.h b/libcxx/include/experimental/__simd/simd.h
index fd919e75e32f51..83f3b05b9b354c 100644
--- a/libcxx/include/experimental/__simd/simd.h
+++ b/libcxx/include/experimental/__simd/simd.h
@@ -43,8 +43,8 @@ class __simd_int_operators<_Simd, _Impl, true> {
// TODO: implement simd class
template <class _Tp, class _Abi>
class simd : public __simd_int_operators<simd<_Tp, _Abi>, __simd_operations<_Tp, _Abi>, is_integral_v<_Tp>> {
- using _Impl = __simd_operations<_Tp, _Abi>;
- using _Storage = typename _Impl::_SimdStorage;
+ using _Impl [[__gnu__::__nodebug__]] = __simd_operations<_Tp, _Abi>;
+ using _Storage [[__gnu__::__nodebug__]] = typename _Impl::_SimdStorage;
_Storage __s_;
diff --git a/libcxx/include/experimental/__simd/simd_mask.h b/libcxx/include/experimental/__simd/simd_mask.h
index 6b6f671bf3e64c..efd15a968c865a 100644
--- a/libcxx/include/experimental/__simd/simd_mask.h
+++ b/libcxx/include/experimental/__simd/simd_mask.h
@@ -27,8 +27,8 @@ inline namespace parallelism_v2 {
// TODO: implement simd_mask class
template <class _Tp, class _Abi>
class simd_mask {
- using _Impl = __mask_operations<_Tp, _Abi>;
- using _Storage = typename _Impl::_MaskStorage;
+ using _Impl [[__gnu__::__nodebug__]] = __mask_operations<_Tp, _Abi>;
+ using _Storage [[__gnu__::__nodebug__]] = typename _Impl::_MaskStorage;
_Storage __s_;
diff --git a/libcxx/include/experimental/__simd/vec_ext.h b/libcxx/include/experimental/__simd/vec_ext.h
index abc7e9595be9c8..e5030fc9397c68 100644
--- a/libcxx/include/experimental/__simd/vec_ext.h
+++ b/libcxx/include/experimental/__simd/vec_ext.h
@@ -55,8 +55,8 @@ struct __mask_storage<_Tp, simd_abi::__vec_ext<_Np>>
template <class _Tp, int _Np>
struct __simd_operations<_Tp, simd_abi::__vec_ext<_Np>> {
- using _SimdStorage = __simd_storage<_Tp, simd_abi::__vec_ext<_Np>>;
- using _MaskStorage = __mask_storage<_Tp, simd_abi::__vec_ext<_Np>>;
+ using _SimdStorage [[__gnu__::__nodebug__]] = __simd_storage<_Tp, simd_abi::__vec_ext<_Np>>;
+ using _MaskStorage [[__gnu__::__nodebug__]] = __mask_storage<_Tp, simd_abi::__vec_ext<_Np>>;
static _LIBCPP_HIDE_FROM_ABI _SimdStorage __broadcast(_Tp __v) noexcept {
_SimdStorage __result;
@@ -101,7 +101,7 @@ struct __simd_operations<_Tp, simd_abi::__vec_ext<_Np>> {
template <class _Tp, int _Np>
struct __mask_operations<_Tp, simd_abi::__vec_ext<_Np>> {
- using _MaskStorage = __mask_storage<_Tp, simd_abi::__vec_ext<_Np>>;
+ using _MaskStorage [[__gnu__::__nodebug__]] = __mask_storage<_Tp, simd_abi::__vec_ext<_Np>>;
static _LIBCPP_HIDE_FROM_ABI _MaskStorage __broadcast(bool __v) noexcept {
_MaskStorage __result;
diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list
index 57730870ddf43e..90993a53e557ce 100644
--- a/libcxx/include/forward_list
+++ b/libcxx/include/forward_list
@@ -313,7 +313,8 @@ struct __forward_begin_node {
};
template <class _Tp, class _VoidPtr>
-using __begin_node_of = __forward_begin_node<__rebind_pointer_t<_VoidPtr, __forward_list_node<_Tp, _VoidPtr> > >;
+using __begin_node_of [[__gnu__::__nodebug__]] =
+ __forward_begin_node<__rebind_pointer_t<_VoidPtr, __forward_list_node<_Tp, _VoidPtr> > >;
template <class _Tp, class _VoidPtr>
struct __forward_list_node : public __begin_node_of<_Tp, _VoidPtr> {
diff --git a/libcxx/include/ios b/libcxx/include/ios
index 2eb32f296aafcf..3301c513553d08 100644
--- a/libcxx/include/ios
+++ b/libcxx/include/ios
@@ -626,9 +626,9 @@ private:
basic_ostream<char_type, traits_type>* __tie_;
# if defined(_LIBCPP_ABI_IOS_ALLOW_ARBITRARY_FILL_VALUE)
- using _FillType = _FillHelper<traits_type>;
+ using _FillType [[__gnu__::__nodebug__]] = _FillHelper<traits_type>;
# else
- using _FillType = _SentinelValueFill<traits_type>;
+ using _FillType [[__gnu__::__nodebug__]] = _SentinelValueFill<traits_type>;
# endif
mutable _FillType __fill_;
};
diff --git a/libcxx/include/optional b/libcxx/include/optional
index 7ad6a9e116941f..17f5bc67e53f51 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -351,8 +351,8 @@ struct __optional_destruct_base<_Tp, true> {
template <class _Tp, bool = is_reference<_Tp>::value>
struct __optional_storage_base : __optional_destruct_base<_Tp> {
- using __base = __optional_destruct_base<_Tp>;
- using value_type = _Tp;
+ using __base [[__gnu__::__nodebug__]] = __optional_destruct_base<_Tp>;
+ using value_type = _Tp;
using __base::__base;
_LIBCPP_HIDE_FROM_ABI constexpr bool has_value() const noexcept { return this->__engaged_; }
@@ -394,8 +394,8 @@ struct __optional_storage_base : __optional_destruct_base<_Tp> {
// to ensure we can make the change in an ABI-compatible manner.
template <class _Tp>
struct __optional_storage_base<_Tp, true> {
- using value_type = _Tp;
- using __raw_type = remove_reference_t<_Tp>;
+ using value_type = _Tp;
+ using __raw_type [[__gnu__::__nodebug__]] = remove_reference_t<_Tp>;
__raw_type* __value_;
template <class _Up>
@@ -553,11 +553,11 @@ struct __optional_move_assign_base<_Tp, false> : __optional_copy_assign_base<_Tp
};
template <class _Tp>
-using __optional_sfinae_ctor_base_t =
+using __optional_sfinae_ctor_base_t [[__gnu__::__nodebug__]] =
__sfinae_ctor_base< is_copy_constructible<_Tp>::value, is_move_constructible<_Tp>::value >;
template <class _Tp>
-using __optional_sfinae_assign_base_t =
+using __optional_sfinae_assign_base_t [[__gnu__::__nodebug__]] =
__sfinae_assign_base< (is_copy_constructible<_Tp>::value && is_copy_assignable<_Tp>::value),
(is_move_constructible<_Tp>::value && is_move_assignable<_Tp>::value) >;
@@ -581,12 +581,13 @@ class _LIBCPP_DECLSPEC_EMPTY_BASES optional
: private __optional_move_assign_base<_Tp>,
private __optional_sfinae_ctor_base_t<_Tp>,
private __optional_sfinae_assign_base_t<_Tp> {
- using __base = __optional_move_assign_base<_Tp>;
+ using __base [[__gnu__::__nodebug__]] = __optional_move_assign_base<_Tp>;
public:
using value_type = _Tp;
- using __trivially_relocatable = conditional_t<__libcpp_is_trivially_relocatable<_Tp>::value, optional, void>;
+ using __trivially_relocatable [[__gnu__::__nodebug__]] =
+ conditional_t<__libcpp_is_trivially_relocatable<_Tp>::value, optional, void>;
private:
// Disable the reference extension using this static assert.
@@ -611,7 +612,7 @@ private:
}
};
template <class _Up>
- using _CheckOptionalArgsCtor =
+ using _CheckOptionalArgsCtor [[__gnu__::__nodebug__]] =
_If< _IsNotSame<__remove_cvref_t<_Up>, in_place_t>::value && _IsNotSame<__remove_cvref_t<_Up>, optional>::value &&
(!is_same_v<remove_cv_t<_Tp>, bool> || !__is_std_optional<__remove_cvref_t<_Up>>::value),
_CheckOptionalArgsConstructor,
@@ -619,7 +620,7 @@ private:
template <class _QualUp>
struct _CheckOptionalLikeConstructor {
template <class _Up, class _Opt = optional<_Up>>
- using __check_constructible_from_opt =
+ using __check_constructible_from_opt [[__gnu__::__nodebug__]] =
_Or< is_constructible<_Tp, _Opt&>,
is_constructible<_Tp, _Opt const&>,
is_constructible<_Tp, _Opt&&>,
@@ -629,7 +630,7 @@ private:
is_convertible<_Opt&&, _Tp>,
is_convertible<_Opt const&&, _Tp> >;
template <class _Up, class _Opt = optional<_Up>>
- using __check_assignable_from_opt =
+ using __check_assignable_from_opt [[__gnu__::__nodebug__]] =
_Or< is_assignable<_Tp&, _Opt&>,
is_assignable<_Tp&, _Opt const&>,
is_assignable<_Tp&, _Opt&&>,
@@ -653,12 +654,12 @@ private:
};
template <class _Up, class _QualUp>
- using _CheckOptionalLikeCtor =
+ using _CheckOptionalLikeCtor [[__gnu__::__nodebug__]] =
_If< _And< _IsNotSame<_Up, _Tp>, is_constructible<_Tp, _QualUp> >::value,
_CheckOptionalLikeConstructor<_QualUp>,
__check_tuple_constructor_fail >;
template <class _Up, class _QualUp>
- using _CheckOptionalLikeAssign =
+ using _CheckOptionalLikeAssign [[__gnu__::__nodebug__]] =
_If< _And< _IsNotSame<_Up, _Tp>, is_constructible<_Tp, _QualUp>, is_assignable<_Tp&, _QualUp> >::value,
_CheckOptionalLikeConstructor<_QualUp>,
__check_tuple_constructor_fail >;
diff --git a/libcxx/include/ratio b/libcxx/include/ratio
index bd262437db34f6..eea95513eb04f0 100644
--- a/libcxx/include/ratio
+++ b/libcxx/include/ratio
@@ -462,7 +462,7 @@ struct _LIBCPP_TEMPLATE_VIS ratio_greater_equal : _BoolConstant<!ratio_less<_R1,
};
template <class _R1, class _R2>
-using __ratio_gcd = ratio<__static_gcd<_R1::num, _R2::num>, __static_lcm<_R1::den, _R2::den> >;
+using __ratio_gcd [[__gnu__::__nodebug__]] = ratio<__static_gcd<_R1::num, _R2::num>, __static_lcm<_R1::den, _R2::den> >;
#if _LIBCPP_STD_VER >= 17
template <class _R1, class _R2>
diff --git a/libcxx/include/regex b/libcxx/include/regex
index bd75e8de7db438..0c330b198698a4 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -4226,7 +4226,8 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator==(const sub_match<_BiIter>& __x, cons
#if _LIBCPP_STD_VER >= 20
template <class _BiIter>
-using __sub_match_cat = compare_three_way_result_t<basic_string<typename iterator_traits<_BiIter>::value_type>>;
+using __sub_match_cat [[__gnu__::__nodebug__]] =
+ compare_three_way_result_t<basic_string<typename iterator_traits<_BiIter>::value_type>>;
template <class _BiIter>
_LIBCPP_HIDE_FROM_ABI auto operator<=>(const sub_match<_BiIter>& __x, const sub_match<_BiIter>& __y) {
diff --git a/libcxx/include/source_location b/libcxx/include/source_location
index d16e3c46fce55e..88495c6b2d6cd7 100644
--- a/libcxx/include/source_location
+++ b/libcxx/include/source_location
@@ -52,7 +52,7 @@ class source_location {
// in constant evaluation, so we don't want to use `void*` as the argument
// type unless the builtin returned that, anyhow, and the invalid cast is
// unavoidable.
- using __bsl_ty = decltype(__builtin_source_location());
+ using __bsl_ty [[__gnu__::__nodebug__]] = decltype(__builtin_source_location());
public:
// The defaulted __ptr argument is necessary so that the builtin is evaluated
diff --git a/libcxx/include/string b/libcxx/include/string
index bf7fc3c37ecd7a..5008a9f87c9535 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -761,7 +761,7 @@ struct __padding<0> {};
template <class _CharT, class _Traits, class _Allocator>
class basic_string {
private:
- using __default_allocator_type = allocator<_CharT>;
+ using __default_allocator_type [[__gnu__::__nodebug__]] = allocator<_CharT>;
public:
typedef basic_string __self;
@@ -793,9 +793,9 @@ public:
// external memory. In such cases, the destructor is responsible for unpoisoning
// the memory to avoid triggering false positives.
// Therefore it's crucial to ensure the destructor is called.
- using __trivially_relocatable = void;
+ using __trivially_relocatable [[__gnu__::__nodebug__]] = void;
#else
- using __trivially_relocatable = __conditional_t<
+ using __trivially_relocatable [[__gnu__::__nodebug__]] = __conditional_t<
__libcpp_is_trivially_relocatable<allocator_type>::value && __libcpp_is_trivially_relocatable<pointer>::value,
basic_string,
void>;
diff --git a/libcxx/include/tuple b/libcxx/include/tuple
index c3f7b8041686d1..f5ee010cf7ab47 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -549,7 +549,8 @@ class _LIBCPP_TEMPLATE_VIS tuple {
get(const tuple<_Up...>&&) _NOEXCEPT;
public:
- using __trivially_relocatable = __conditional_t<_And<__libcpp_is_trivially_relocatable<_Tp>...>::value, tuple, void>;
+ using __trivially_relocatable [[__gnu__::__nodebug__]] =
+ __conditional_t<_And<__libcpp_is_trivially_relocatable<_Tp>...>::value, tuple, void>;
// [tuple.cnstr]
diff --git a/libcxx/include/variant b/libcxx/include/variant
index f604527cd22569..00cecc886c38cb 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -355,7 +355,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr auto __choose_index_type() {
}
template <size_t _NumAlts>
-using __variant_index_t = decltype(std::__choose_index_type<_NumAlts>());
+using __variant_index_t [[__gnu__::__nodebug__]] = decltype(std::__choose_index_type<_NumAlts>());
template <class _IndexType>
constexpr _IndexType __variant_npos = static_cast<_IndexType>(-1);
@@ -656,8 +656,8 @@ private:
template <size_t _Index, class _Tp>
struct _LIBCPP_TEMPLATE_VIS __alt {
- using __value_type = _Tp;
- static constexpr size_t __index = _Index;
+ using __value_type [[__gnu__::__nodebug__]] = _Tp;
+ static constexpr size_t __index = _Index;
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI explicit constexpr __alt(in_place_t, _Args&&... __args)
@@ -711,7 +711,7 @@ _LIBCPP_VARIANT_UNION(_Trait::_Unavailable, _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTE
template <_Trait _DestructibleTrait, class... _Types>
class _LIBCPP_TEMPLATE_VIS __base {
public:
- using __index_t = __variant_index_t<sizeof...(_Types)>;
+ using __index_t [[__gnu__::__nodebug__]] = __variant_index_t<sizeof...(_Types)>;
_LIBCPP_HIDE_FROM_ABI explicit constexpr __base(__valueless_t __tag) noexcept
: __data(__tag), __index(__variant_npos<__index_t>) {}
@@ -751,8 +751,8 @@ class _LIBCPP_TEMPLATE_VIS __dtor;
template <class... _Types> \
class _LIBCPP_TEMPLATE_VIS __dtor<__traits<_Types...>, destructible_trait> \
: public __base<destructible_trait, _Types...> { \
- using __base_type = __base<destructible_trait, _Types...>; \
- using __index_t = typename __base_type::__index_t; \
+ using __base_type [[__gnu__::__nodebug__]] = __base<destructible_trait, _Types...>; \
+ using __index_t [[__gnu__::__nodebug__]] = typename __base_type::__index_t; \
\
public: \
using __base_type::__base_type; \
@@ -797,7 +797,7 @@ _LIBCPP_VARIANT_DESTRUCTOR(_Trait::_Unavailable,
template <class _Traits>
class _LIBCPP_TEMPLATE_VIS __ctor : public __dtor<_Traits> {
- using __base_type = __dtor<_Traits>;
+ using __base_type [[__gnu__::__nodebug__]] = __dtor<_Traits>;
public:
using __base_type::__base_type;
@@ -829,7 +829,7 @@ class _LIBCPP_TEMPLATE_VIS __move_constructor;
template <class... _Types> \
class _LIBCPP_TEMPLATE_VIS __move_constructor<__traits<_Types...>, move_constructible_trait> \
: public __ctor<__traits<_Types...>> { \
- using __base_type = __ctor<__traits<_Types...>>; \
+ using __base_type [[__gnu__::__nodebug__]] = __ctor<__traits<_Types...>>; \
\
public: \
using __base_type::__base_type; \
@@ -867,7 +867,7 @@ class _LIBCPP_TEMPLATE_VIS __copy_constructor;
template <class... _Types> \
class _LIBCPP_TEMPLATE_VIS __copy_constructor<__traits<_Types...>, copy_constructible_trait> \
: public __move_constructor<__traits<_Types...>> { \
- using __base_type = __move_constructor<__traits<_Types...>>; \
+ using __base_type [[__gnu__::__nodebug__]] = __move_constructor<__traits<_Types...>>; \
\
public: \
using __base_type::__base_type; \
@@ -897,7 +897,7 @@ _LIBCPP_VARIANT_COPY_CONSTRUCTOR(
template <class _Traits>
class _LIBCPP_TEMPLATE_VIS __assignment : public __copy_constructor<_Traits> {
- using __base_type = __copy_constructor<_Traits>;
+ using __base_type [[__gnu__::__nodebug__]] = __copy_constructor<_Traits>;
public:
using __base_type::__base_type;
@@ -956,7 +956,7 @@ class _LIBCPP_TEMPLATE_VIS __move_assignment;
template <class... _Types> \
class _LIBCPP_TEMPLATE_VIS __move_assignment<__traits<_Types...>, move_assignable_trait> \
: public __assignment<__traits<_Types...>> { \
- using __base_type = __assignment<__traits<_Types...>>; \
+ using __base_type [[__gnu__::__nodebug__]] = __assignment<__traits<_Types...>>; \
\
public: \
using __base_type::__base_type; \
@@ -995,7 +995,7 @@ class _LIBCPP_TEMPLATE_VIS __copy_assignment;
template <class... _Types> \
class _LIBCPP_TEMPLATE_VIS __copy_assignment<__traits<_Types...>, copy_assignable_trait> \
: public __move_assignment<__traits<_Types...>> { \
- using __base_type = __move_assignment<__traits<_Types...>>; \
+ using __base_type [[__gnu__::__nodebug__]] = __move_assignment<__traits<_Types...>>; \
\
public: \
using __base_type::__base_type; \
@@ -1028,7 +1028,7 @@ _LIBCPP_VARIANT_COPY_ASSIGNMENT(_Trait::_Unavailable,
template <class... _Types>
class _LIBCPP_TEMPLATE_VIS __impl : public __copy_assignment<__traits<_Types...>> {
- using __base_type = __copy_assignment<__traits<_Types...>>;
+ using __base_type [[__gnu__::__nodebug__]] = __copy_assignment<__traits<_Types...>>;
public:
using __base_type::__base_type; // get in_place_index_t constructor & friends
@@ -1095,7 +1095,7 @@ private:
struct __no_narrowing_check {
template <class _Dest, class _Source>
- using _Apply = __type_identity<_Dest>;
+ using _Apply [[__gnu__::__nodebug__]] = __type_identity<_Dest>;
};
struct __narrowing_check {
@@ -1136,7 +1136,7 @@ using _MakeOverloads _LIBCPP_NODEBUG =
typename __make_overloads_imp< __make_indices_imp<sizeof...(_Types), 0> >::template _Apply<_Types...>;
template <class _Tp, class... _Types>
-using __best_match_t = typename invoke_result_t<_MakeOverloads<_Types...>, _Tp, _Tp>::type;
+using __best_match_t [[__gnu__::__nodebug__]] = typename invoke_result_t<_MakeOverloads<_Types...>, _Tp, _Tp>::type;
} // namespace __variant_detail
@@ -1168,10 +1168,10 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DECLSPEC_EMPTY_BASES variant
static_assert(__all<!is_void_v<_Types>...>::value, "variant can not have a void type as an alternative.");
- using __first_type = variant_alternative_t<0, variant>;
+ using __first_type [[__gnu__::__nodebug__]] = variant_alternative_t<0, variant>;
public:
- using __trivially_relocatable =
+ using __trivially_relocatable [[__gnu__::__nodebug__]] =
conditional_t<_And<__libcpp_is_trivially_relocatable<_Types>...>::value, variant, void>;
template <bool _Dummy = true,
diff --git a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
index 05c44e49b448cd..1714793d083d0c 100644
--- a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
+++ b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
@@ -92,6 +92,7 @@ set(SOURCES
header_exportable_declarations.cpp
hide_from_abi.cpp
internal_ftm_use.cpp
+ nodebug_on_internal_aliases.cpp
proper_version_checks.cpp
qualify_declval.cpp
robust_against_adl.cpp
diff --git a/libcxx/test/tools/clang_tidy_checks/libcpp_module.cpp b/libcxx/test/tools/clang_tidy_checks/libcpp_module.cpp
index 54beed5e30be58..df0081f0c563aa 100644
--- a/libcxx/test/tools/clang_tidy_checks/libcpp_module.cpp
+++ b/libcxx/test/tools/clang_tidy_checks/libcpp_module.cpp
@@ -13,6 +13,7 @@
#include "header_exportable_declarations.hpp"
#include "hide_from_abi.hpp"
#include "internal_ftm_use.hpp"
+#include "nodebug_on_internal_aliases.hpp"
#include "proper_version_checks.hpp"
#include "qualify_declval.hpp"
#include "robust_against_adl.hpp"
@@ -26,6 +27,7 @@ class LibcxxTestModule : public clang::tidy::ClangTidyModule {
check_factories.registerCheck<libcpp::header_exportable_declarations>("libcpp-header-exportable-declarations");
check_factories.registerCheck<libcpp::hide_from_abi>("libcpp-hide-from-abi");
check_factories.registerCheck<libcpp::internal_ftm_use>("libcpp-internal-ftms");
+ check_factories.registerCheck<libcpp::nodebug_on_internal_aliases>("libcpp-nodebug-on-aliases");
check_factories.registerCheck<libcpp::proper_version_checks>("libcpp-cpp-version-check");
check_factories.registerCheck<libcpp::robust_against_adl_check>("libcpp-robust-against-adl");
check_factories.registerCheck<libcpp::uglify_attributes>("libcpp-uglify-attributes");
diff --git a/libcxx/test/tools/clang_tidy_checks/nodebug_on_internal_aliases.cpp b/libcxx/test/tools/clang_tidy_checks/nodebug_on_internal_aliases.cpp
new file mode 100644
index 00000000000000..42d2928a14ae94
--- /dev/null
+++ b/libcxx/test/tools/clang_tidy_checks/nodebug_on_internal_aliases.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang-tidy/ClangTidyCheck.h"
+
+#include "nodebug_on_internal_aliases.hpp"
+#include "utilities.hpp"
+
+namespace libcpp {
+namespace {
+AST_MATCHER(clang::NamedDecl, isPretty) { return !isUglyName(Node.getName()); }
+} // namespace
+
+nodebug_on_internal_aliases::nodebug_on_internal_aliases(llvm::StringRef name, clang::tidy::ClangTidyContext* context)
+ : clang::tidy::ClangTidyCheck(name, context) {}
+
+void nodebug_on_internal_aliases::registerMatchers(clang::ast_matchers::MatchFinder* finder) {
+ using namespace clang::ast_matchers;
+ finder->addMatcher(
+ typeAliasDecl(unless(anyOf(isPretty(), hasAttr(clang::attr::NoDebug), hasAncestor(functionDecl()))))
+ .bind("nodebug_on_internal_aliases"),
+ this);
+}
+
+void nodebug_on_internal_aliases::check(const clang::ast_matchers::MatchFinder::MatchResult& result) {
+ if (const auto* alias = result.Nodes.getNodeAs<clang::TypeAliasDecl>("nodebug_on_internal_aliases")) {
+ diag(alias->getBeginLoc(), "Internal aliases should always be marked [[__gnu__::__nodebug__]]");
+ }
+}
+} // namespace libcpp
diff --git a/libcxx/test/tools/clang_tidy_checks/nodebug_on_internal_aliases.hpp b/libcxx/test/tools/clang_tidy_checks/nodebug_on_internal_aliases.hpp
new file mode 100644
index 00000000000000..6270facb71f51a
--- /dev/null
+++ b/libcxx/test/tools/clang_tidy_checks/nodebug_on_internal_aliases.hpp
@@ -0,0 +1,18 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang-tidy/ClangTidyCheck.h"
+
+namespace libcpp {
+class nodebug_on_internal_aliases : public clang::tidy::ClangTidyCheck {
+public:
+ nodebug_on_internal_aliases(llvm::StringRef, clang::tidy::ClangTidyContext*);
+ void registerMatchers(clang::ast_matchers::MatchFinder*) override;
+ void check(const clang::ast_matchers::MatchFinder::MatchResult&) override;
+};
+} // namespace libcpp
diff --git a/libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp b/libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp
index 7812b236f613c6..e5b11f155c6f31 100644
--- a/libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp
+++ b/libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp
@@ -10,20 +10,11 @@
#include "clang-tidy/ClangTidyModuleRegistry.h"
#include "uglify_attributes.hpp"
+#include "utilities.hpp"
-#include <algorithm>
-#include <array>
-#include <span>
-#include <string_view>
+#include <optional>
namespace {
-bool isUgly(std::string_view str) {
- if (str.size() < 2)
- return false;
- if (str[0] == '_' && str[1] >= 'A' && str[1] <= 'Z')
- return true;
- return str.find("__") != std::string_view::npos;
-}
// Starting with Clang 17 ToT C++23 support is provided by CPlusPlus23 instead
// of C++23 support is provided by CPlusPlus2b. To allow a smooth transition for
@@ -77,17 +68,15 @@ AST_MATCHER(clang::Attr, isPretty) {
if (Node.isKeywordAttribute() || !Node.getAttrName())
return false;
if (Node.isCXX11Attribute() && !Node.hasScope()) {
- if (isUgly(Node.getAttrName()->getName()))
+ if (isUglyName(Node.getAttrName()->getName()))
return false;
return !llvm::is_contained(
get_standard_attributes(Finder->getASTContext().getLangOpts()), Node.getAttrName()->getName());
}
if (Node.hasScope())
- if (!isUgly(Node.getScopeName()->getName()))
+ if (!isUglyName(Node.getScopeName()->getName()))
return true;
- return !isUgly(Node.getAttrName()->getName());
-
- return false;
+ return !isUglyName(Node.getAttrName()->getName());
}
std::optional<std::string> getUglyfiedCXX11Attr(const clang::Attr& attr) {
diff --git a/libcxx/test/tools/clang_tidy_checks/utilities.hpp b/libcxx/test/tools/clang_tidy_checks/utilities.hpp
new file mode 100644
index 00000000000000..5ee234686ea07f
--- /dev/null
+++ b/libcxx/test/tools/clang_tidy_checks/utilities.hpp
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LIBCXX_TEST_TOOLS_CLANG_TIDY_CHECKS_UTILITIES_HPP
+#define LIBCXX_TEST_TOOLS_CLANG_TIDY_CHECKS_UTILITIES_HPP
+
+#include <string_view>
+
+inline bool isUglyName(std::string_view str) {
+ if (str.size() < 2)
+ return false;
+ if (str[0] == '_' && str[1] >= 'A' && str[1] <= 'Z')
+ return true;
+ return str.find("__") != std::string_view::npos;
+}
+
+
+#endif // LIBCXX_TEST_TOOLS_CLANG_TIDY_CHECKS_UTILITIES_HPP
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 2c5cb169c0a9a3..fa23a0c5c50642 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -135,7 +135,7 @@ def getSuitableClangTidy(cfg):
runScriptExitCode(
cfg, ["stat %{test-tools-dir}/clang_tidy_checks/libcxx-tidy.plugin"]
)
- != 0
+ == 0
):
return None
More information about the libcxx-commits
mailing list