Skip to content

Commit 4a184c0

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:40acaa394fa2 into amd-gfx:abc91debd3ba
Local branch amd-gfx abc91de Merged main:bc23ef3feba9 into amd-gfx:0060b1beee69 Remote branch main 40acaa3 [clang-format] Fix a crash in `QualifierAlignment: Right` (llvm#120821)
2 parents abc91de + 40acaa3 commit 4a184c0

36 files changed

+109
-101
lines changed

clang/lib/Format/QualifierAlignmentFixer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight(
348348
}
349349
}
350350

351-
if (Next->is(tok::kw_auto))
351+
if (Next && Next->is(tok::kw_auto))
352352
TypeToken = Next;
353353

354354
// Place the Qualifier at the end of the list of qualifiers.

clang/unittests/Format/QualifierFixerTest.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,11 @@ TEST_F(QualifierFixerTest, RightQualifier) {
531531
verifyFormat("float (C::*const p)(int);", Style);
532532
verifyFormat("float (C::*p)(int) const;", Style);
533533
verifyFormat("float const (C::*p)(int);", "const float (C::*p)(int);", Style);
534+
535+
Style.BreakBeforeBraces = FormatStyle::BS_Custom;
536+
Style.BraceWrapping.AfterFunction = true;
537+
verifyFormat("auto foo() -> T const { return bar; }",
538+
"auto foo() -> const T { return bar; }", Style);
534539
}
535540

536541
TEST_F(QualifierFixerTest, LeftQualifier) {

libcxx/include/__config

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,11 +1170,7 @@ typedef __char32_t char32_t;
11701170
# define _LIBCPP_NOESCAPE
11711171
# endif
11721172

1173-
# if __has_attribute(__nodebug__)
1174-
# define _LIBCPP_NODEBUG __attribute__((__nodebug__))
1175-
# else
1176-
# define _LIBCPP_NODEBUG
1177-
# endif
1173+
# define _LIBCPP_NODEBUG [[__gnu__::__nodebug__]]
11781174

11791175
# if __has_attribute(__standalone_debug__)
11801176
# define _LIBCPP_STANDALONE_DEBUG __attribute__((__standalone_debug__))

libcxx/include/__functional/function.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ class __alloc_func<_Fp, _Ap, _Rp(_ArgTypes...)> {
146146
_LIBCPP_COMPRESSED_PAIR(_Fp, __func_, _Ap, __alloc_);
147147

148148
public:
149-
typedef _LIBCPP_NODEBUG _Fp _Target;
150-
typedef _LIBCPP_NODEBUG _Ap _Alloc;
149+
using _Target _LIBCPP_NODEBUG = _Fp;
150+
using _Alloc _LIBCPP_NODEBUG = _Ap;
151151

152152
_LIBCPP_HIDE_FROM_ABI const _Target& __target() const { return __func_; }
153153

@@ -198,7 +198,7 @@ class __default_alloc_func<_Fp, _Rp(_ArgTypes...)> {
198198
_Fp __f_;
199199

200200
public:
201-
typedef _LIBCPP_NODEBUG _Fp _Target;
201+
using _Target _LIBCPP_NODEBUG = _Fp;
202202

203203
_LIBCPP_HIDE_FROM_ABI const _Target& __target() const { return __f_; }
204204

libcxx/include/__fwd/memory_resource.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# pragma GCC system_header
1616
#endif
1717

18+
#if _LIBCPP_STD_VER >= 17
19+
1820
_LIBCPP_BEGIN_NAMESPACE_STD
1921

2022
namespace pmr {
@@ -24,4 +26,6 @@ class _LIBCPP_AVAILABILITY_PMR _LIBCPP_TEMPLATE_VIS polymorphic_allocator;
2426

2527
_LIBCPP_END_NAMESPACE_STD
2628

29+
#endif // _LIBCPP_STD_VER >= 17
30+
2731
#endif // _LIBCPP___FWD_MEMORY_RESOURCE_H

libcxx/include/__memory/allocator_arg_t.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ constexpr allocator_arg_t allocator_arg = allocator_arg_t();
3939

4040
template <class _Tp, class _Alloc, class... _Args>
4141
struct __uses_alloc_ctor_imp {
42-
typedef _LIBCPP_NODEBUG __remove_cvref_t<_Alloc> _RawAlloc;
43-
static const bool __ua = uses_allocator<_Tp, _RawAlloc>::value;
44-
static const bool __ic = is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value;
45-
static const int value = __ua ? 2 - __ic : 0;
42+
using _RawAlloc _LIBCPP_NODEBUG = __remove_cvref_t<_Alloc>;
43+
static const bool __ua = uses_allocator<_Tp, _RawAlloc>::value;
44+
static const bool __ic = is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value;
45+
static const int value = __ua ? 2 - __ic : 0;
4646
};
4747

4848
template <class _Tp, class _Alloc, class... _Args>

libcxx/include/__memory/allocator_destructor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2020

2121
template <class _Alloc>
2222
class __allocator_destructor {
23-
typedef _LIBCPP_NODEBUG allocator_traits<_Alloc> __alloc_traits;
23+
using __alloc_traits _LIBCPP_NODEBUG = allocator_traits<_Alloc>;
2424

2525
public:
26-
typedef _LIBCPP_NODEBUG typename __alloc_traits::pointer pointer;
27-
typedef _LIBCPP_NODEBUG typename __alloc_traits::size_type size_type;
26+
using pointer _LIBCPP_NODEBUG = typename __alloc_traits::pointer;
27+
using size_type _LIBCPP_NODEBUG = typename __alloc_traits::size_type;
2828

2929
private:
3030
_Alloc& __alloc_;

libcxx/include/__memory/pointer_traits.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ struct __pointer_traits_element_type {};
5050

5151
template <class _Ptr>
5252
struct __pointer_traits_element_type<_Ptr, true> {
53-
typedef _LIBCPP_NODEBUG typename _Ptr::element_type type;
53+
using type _LIBCPP_NODEBUG = typename _Ptr::element_type;
5454
};
5555

5656
template <template <class, class...> class _Sp, class _Tp, class... _Args>
5757
struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, true> {
58-
typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::element_type type;
58+
using type _LIBCPP_NODEBUG = typename _Sp<_Tp, _Args...>::element_type;
5959
};
6060

6161
template <template <class, class...> class _Sp, class _Tp, class... _Args>
6262
struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, false> {
63-
typedef _LIBCPP_NODEBUG _Tp type;
63+
using type _LIBCPP_NODEBUG = _Tp;
6464
};
6565

6666
template <class _Tp, class = void>
@@ -71,12 +71,12 @@ struct __has_difference_type<_Tp, __void_t<typename _Tp::difference_type> > : tr
7171

7272
template <class _Ptr, bool = __has_difference_type<_Ptr>::value>
7373
struct __pointer_traits_difference_type {
74-
typedef _LIBCPP_NODEBUG ptrdiff_t type;
74+
using type _LIBCPP_NODEBUG = ptrdiff_t;
7575
};
7676

7777
template <class _Ptr>
7878
struct __pointer_traits_difference_type<_Ptr, true> {
79-
typedef _LIBCPP_NODEBUG typename _Ptr::difference_type type;
79+
using type _LIBCPP_NODEBUG = typename _Ptr::difference_type;
8080
};
8181

8282
template <class _Tp, class _Up>
@@ -96,18 +96,18 @@ struct __has_rebind {
9696
template <class _Tp, class _Up, bool = __has_rebind<_Tp, _Up>::value>
9797
struct __pointer_traits_rebind {
9898
#ifndef _LIBCPP_CXX03_LANG
99-
typedef _LIBCPP_NODEBUG typename _Tp::template rebind<_Up> type;
99+
using type _LIBCPP_NODEBUG = typename _Tp::template rebind<_Up>;
100100
#else
101-
typedef _LIBCPP_NODEBUG typename _Tp::template rebind<_Up>::other type;
101+
using type _LIBCPP_NODEBUG = typename _Tp::template rebind<_Up>::other;
102102
#endif
103103
};
104104

105105
template <template <class, class...> class _Sp, class _Tp, class... _Args, class _Up>
106106
struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, true> {
107107
#ifndef _LIBCPP_CXX03_LANG
108-
typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::template rebind<_Up> type;
108+
using type _LIBCPP_NODEBUG = typename _Sp<_Tp, _Args...>::template rebind<_Up>;
109109
#else
110-
typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::template rebind<_Up>::other type;
110+
using type _LIBCPP_NODEBUG = typename _Sp<_Tp, _Args...>::template rebind<_Up>::other;
111111
#endif
112112
};
113113

libcxx/include/__memory/unique_ptr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
161161
private:
162162
_LIBCPP_COMPRESSED_PAIR(pointer, __ptr_, deleter_type, __deleter_);
163163

164-
typedef _LIBCPP_NODEBUG __unique_ptr_deleter_sfinae<_Dp> _DeleterSFINAE;
164+
using _DeleterSFINAE _LIBCPP_NODEBUG = __unique_ptr_deleter_sfinae<_Dp>;
165165

166166
template <bool _Dummy>
167167
using _LValRefType _LIBCPP_NODEBUG = typename __dependent_type<_DeleterSFINAE, _Dummy>::__lval_ref_type;

libcxx/include/__ranges/join_view.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,8 @@ template <class _JoinViewIterator>
377377
__has_random_access_iterator_category<typename _JoinViewIterator::_Outer>::value &&
378378
__has_random_access_iterator_category<typename _JoinViewIterator::_Inner>::value)
379379
struct __segmented_iterator_traits<_JoinViewIterator> {
380-
using __segment_iterator =
381-
_LIBCPP_NODEBUG __iterator_with_data<typename _JoinViewIterator::_Outer, typename _JoinViewIterator::_Parent*>;
380+
using __segment_iterator _LIBCPP_NODEBUG =
381+
__iterator_with_data<typename _JoinViewIterator::_Outer, typename _JoinViewIterator::_Parent*>;
382382
using __local_iterator = typename _JoinViewIterator::_Inner;
383383

384384
// TODO: Would it make sense to enable the optimization for other iterator types?

libcxx/include/__tuple/make_tuple_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ struct __make_tuple_types {
6565

6666
template <class... _Types, size_t _Ep>
6767
struct __make_tuple_types<tuple<_Types...>, _Ep, 0, true> {
68-
typedef _LIBCPP_NODEBUG __tuple_types<_Types...> type;
68+
using type _LIBCPP_NODEBUG = __tuple_types<_Types...>;
6969
};
7070

7171
template <class... _Types, size_t _Ep>
7272
struct __make_tuple_types<__tuple_types<_Types...>, _Ep, 0, true> {
73-
typedef _LIBCPP_NODEBUG __tuple_types<_Types...> type;
73+
using type _LIBCPP_NODEBUG = __tuple_types<_Types...>;
7474
};
7575

7676
_LIBCPP_END_NAMESPACE_STD

libcxx/include/__tuple/sfinae_helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ struct __tuple_constructible<_Tp, _Up, true, true>
5959

6060
template <size_t _Ip, class... _Tp>
6161
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, tuple<_Tp...> > {
62-
typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type;
62+
using type _LIBCPP_NODEBUG = typename tuple_element<_Ip, __tuple_types<_Tp...> >::type;
6363
};
6464

6565
struct _LIBCPP_EXPORTED_FROM_ABI __check_tuple_constructor_fail {

libcxx/include/__tuple/tuple_element.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ struct _LIBCPP_TEMPLATE_VIS tuple_element;
2525

2626
template <size_t _Ip, class _Tp>
2727
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const _Tp> {
28-
typedef _LIBCPP_NODEBUG const typename tuple_element<_Ip, _Tp>::type type;
28+
using type _LIBCPP_NODEBUG = const typename tuple_element<_Ip, _Tp>::type;
2929
};
3030

3131
template <size_t _Ip, class _Tp>
3232
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, volatile _Tp> {
33-
typedef _LIBCPP_NODEBUG volatile typename tuple_element<_Ip, _Tp>::type type;
33+
using type _LIBCPP_NODEBUG = volatile typename tuple_element<_Ip, _Tp>::type;
3434
};
3535

3636
template <size_t _Ip, class _Tp>
3737
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp> {
38-
typedef _LIBCPP_NODEBUG const volatile typename tuple_element<_Ip, _Tp>::type type;
38+
using type _LIBCPP_NODEBUG = const volatile typename tuple_element<_Ip, _Tp>::type;
3939
};
4040

4141
#ifndef _LIBCPP_CXX03_LANG
4242

4343
template <size_t _Ip, class... _Types>
4444
struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...> > {
4545
static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range");
46-
typedef _LIBCPP_NODEBUG __type_pack_element<_Ip, _Types...> type;
46+
using type _LIBCPP_NODEBUG = __type_pack_element<_Ip, _Types...>;
4747
};
4848

4949
# if _LIBCPP_STD_VER >= 14

libcxx/include/__type_traits/add_cv_quals.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
1919

2020
template <class _Tp>
2121
struct _LIBCPP_TEMPLATE_VIS add_const {
22-
typedef _LIBCPP_NODEBUG const _Tp type;
22+
using type _LIBCPP_NODEBUG = const _Tp;
2323
};
2424

2525
#if _LIBCPP_STD_VER >= 14
@@ -29,7 +29,7 @@ using add_const_t = typename add_const<_Tp>::type;
2929

3030
template <class _Tp>
3131
struct _LIBCPP_TEMPLATE_VIS add_cv {
32-
typedef _LIBCPP_NODEBUG const volatile _Tp type;
32+
using type _LIBCPP_NODEBUG = const volatile _Tp;
3333
};
3434

3535
#if _LIBCPP_STD_VER >= 14
@@ -39,7 +39,7 @@ using add_cv_t = typename add_cv<_Tp>::type;
3939

4040
template <class _Tp>
4141
struct _LIBCPP_TEMPLATE_VIS add_volatile {
42-
typedef _LIBCPP_NODEBUG volatile _Tp type;
42+
using type _LIBCPP_NODEBUG = volatile _Tp;
4343
};
4444

4545
#if _LIBCPP_STD_VER >= 14

libcxx/include/__type_traits/add_lvalue_reference.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ using __add_lvalue_reference_t = __add_lvalue_reference(_Tp);
2727

2828
template <class _Tp, bool = __libcpp_is_referenceable<_Tp>::value>
2929
struct __add_lvalue_reference_impl {
30-
typedef _LIBCPP_NODEBUG _Tp type;
30+
using type _LIBCPP_NODEBUG = _Tp;
3131
};
3232
template <class _Tp >
3333
struct __add_lvalue_reference_impl<_Tp, true> {
34-
typedef _LIBCPP_NODEBUG _Tp& type;
34+
using type _LIBCPP_NODEBUG = _Tp&;
3535
};
3636

3737
template <class _Tp>

libcxx/include/__type_traits/add_pointer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ using __add_pointer_t = __add_pointer(_Tp);
2828
#else
2929
template <class _Tp, bool = __libcpp_is_referenceable<_Tp>::value || is_void<_Tp>::value>
3030
struct __add_pointer_impl {
31-
typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tp>* type;
31+
using type _LIBCPP_NODEBUG = __libcpp_remove_reference_t<_Tp>*;
3232
};
3333
template <class _Tp>
3434
struct __add_pointer_impl<_Tp, false> {
35-
typedef _LIBCPP_NODEBUG _Tp type;
35+
using type _LIBCPP_NODEBUG = _Tp;
3636
};
3737

3838
template <class _Tp>

libcxx/include/__type_traits/add_rvalue_reference.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ using __add_rvalue_reference_t = __add_rvalue_reference(_Tp);
2727

2828
template <class _Tp, bool = __libcpp_is_referenceable<_Tp>::value>
2929
struct __add_rvalue_reference_impl {
30-
typedef _LIBCPP_NODEBUG _Tp type;
30+
using type _LIBCPP_NODEBUG = _Tp;
3131
};
3232
template <class _Tp >
3333
struct __add_rvalue_reference_impl<_Tp, true> {
34-
typedef _LIBCPP_NODEBUG _Tp&& type;
34+
using type _LIBCPP_NODEBUG = _Tp&&;
3535
};
3636

3737
template <class _Tp>

libcxx/include/__type_traits/common_type.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct __common_type2_imp {};
6161
// sub-bullet 3 - "if decay_t<decltype(false ? declval<D1>() : declval<D2>())> ..."
6262
template <class _Tp, class _Up>
6363
struct __common_type2_imp<_Tp, _Up, __void_t<decltype(true ? std::declval<_Tp>() : std::declval<_Up>())> > {
64-
typedef _LIBCPP_NODEBUG __decay_t<decltype(true ? std::declval<_Tp>() : std::declval<_Up>())> type;
64+
using type _LIBCPP_NODEBUG = __decay_t<decltype(true ? std::declval<_Tp>() : std::declval<_Up>())>;
6565
};
6666

6767
template <class, class = void>

libcxx/include/__type_traits/decay.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,25 @@ struct decay {
3737
#else
3838
template <class _Up, bool>
3939
struct __decay {
40-
typedef _LIBCPP_NODEBUG __remove_cv_t<_Up> type;
40+
using type _LIBCPP_NODEBUG = __remove_cv_t<_Up>;
4141
};
4242

4343
template <class _Up>
4444
struct __decay<_Up, true> {
4545
public:
46-
typedef _LIBCPP_NODEBUG
46+
using type _LIBCPP_NODEBUG =
4747
__conditional_t<is_array<_Up>::value,
4848
__add_pointer_t<__remove_extent_t<_Up> >,
49-
__conditional_t<is_function<_Up>::value, typename add_pointer<_Up>::type, __remove_cv_t<_Up> > >
50-
type;
49+
__conditional_t<is_function<_Up>::value, typename add_pointer<_Up>::type, __remove_cv_t<_Up> > >;
5150
};
5251

5352
template <class _Tp>
5453
struct _LIBCPP_TEMPLATE_VIS decay {
5554
private:
56-
typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tp> _Up;
55+
using _Up _LIBCPP_NODEBUG = __libcpp_remove_reference_t<_Tp>;
5756

5857
public:
59-
typedef _LIBCPP_NODEBUG typename __decay<_Up, __libcpp_is_referenceable<_Up>::value>::type type;
58+
using type _LIBCPP_NODEBUG = typename __decay<_Up, __libcpp_is_referenceable<_Up>::value>::type;
6059
};
6160

6261
template <class _Tp>

libcxx/include/__type_traits/remove_pointer.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ using __remove_pointer_t = __remove_pointer(_Tp);
3232
# endif
3333
#else
3434
// clang-format off
35-
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer {typedef _LIBCPP_NODEBUG _Tp type;};
36-
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp*> {typedef _LIBCPP_NODEBUG _Tp type;};
37-
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const> {typedef _LIBCPP_NODEBUG _Tp type;};
38-
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* volatile> {typedef _LIBCPP_NODEBUG _Tp type;};
39-
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const volatile> {typedef _LIBCPP_NODEBUG _Tp type;};
35+
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer {using type _LIBCPP_NODEBUG = _Tp;};
36+
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp*> {using type _LIBCPP_NODEBUG = _Tp;};
37+
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const> {using type _LIBCPP_NODEBUG = _Tp;};
38+
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* volatile> {using type _LIBCPP_NODEBUG = _Tp;};
39+
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const volatile> {using type _LIBCPP_NODEBUG = _Tp;};
4040
// clang-format on
4141

4242
template <class _Tp>

libcxx/include/__type_traits/type_list.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ struct __find_first;
2929

3030
template <class _Hp, class _Tp, size_t _Size>
3131
struct __find_first<__type_list<_Hp, _Tp>, _Size, true> {
32-
typedef _LIBCPP_NODEBUG _Hp type;
32+
using type _LIBCPP_NODEBUG = _Hp;
3333
};
3434

3535
template <class _Hp, class _Tp, size_t _Size>
3636
struct __find_first<__type_list<_Hp, _Tp>, _Size, false> {
37-
typedef _LIBCPP_NODEBUG typename __find_first<_Tp, _Size>::type type;
37+
using type _LIBCPP_NODEBUG = typename __find_first<_Tp, _Size>::type;
3838
};
3939

4040
_LIBCPP_END_NAMESPACE_STD

libcxx/include/__type_traits/unwrap_ref.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2121

2222
template <class _Tp>
2323
struct __unwrap_reference {
24-
typedef _LIBCPP_NODEBUG _Tp type;
24+
using type _LIBCPP_NODEBUG = _Tp;
2525
};
2626

2727
template <class _Tp>
2828
struct __unwrap_reference<reference_wrapper<_Tp> > {
29-
typedef _LIBCPP_NODEBUG _Tp& type;
29+
using type _LIBCPP_NODEBUG = _Tp&;
3030
};
3131

3232
#if _LIBCPP_STD_VER >= 20

0 commit comments

Comments
 (0)