Skip to content

[libc++] Replace uses of _VSTD:: by std:: #74331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Dec 4, 2023

As part of the upcoming clang-formatting of libc++, this patch performs the long desired removal of the _VSTD macro.

See https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all for the clang-format proposal.

@ldionne ldionne requested a review from a team as a code owner December 4, 2023 15:38
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Dec 4, 2023
@llvmbot
Copy link
Member

llvmbot commented Dec 4, 2023

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

As part of the upcoming clang-formatting of libc++, this patch performs the long desired removal of the _VSTD macro.

See https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all for the clang-format proposal.


Patch is 736.55 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/74331.diff

210 Files Affected:

  • (modified) libcxx/docs/Contributing.rst (-1)
  • (modified) libcxx/include/__algorithm/clamp.h (+1-1)
  • (modified) libcxx/include/__algorithm/copy_n.h (+3-3)
  • (modified) libcxx/include/__algorithm/equal.h (+2-2)
  • (modified) libcxx/include/__algorithm/fill.h (+2-2)
  • (modified) libcxx/include/__algorithm/fill_n.h (+1-1)
  • (modified) libcxx/include/__algorithm/find_first_of.h (+1-1)
  • (modified) libcxx/include/__algorithm/for_each_n.h (+1-1)
  • (modified) libcxx/include/__algorithm/generate_n.h (+1-1)
  • (modified) libcxx/include/__algorithm/inplace_merge.h (+2-2)
  • (modified) libcxx/include/__algorithm/is_heap.h (+1-1)
  • (modified) libcxx/include/__algorithm/is_heap_until.h (+1-1)
  • (modified) libcxx/include/__algorithm/is_sorted.h (+2-2)
  • (modified) libcxx/include/__algorithm/is_sorted_until.h (+2-2)
  • (modified) libcxx/include/__algorithm/lexicographical_compare.h (+2-2)
  • (modified) libcxx/include/__algorithm/max.h (+3-3)
  • (modified) libcxx/include/__algorithm/max_element.h (+2-2)
  • (modified) libcxx/include/__algorithm/merge.h (+4-4)
  • (modified) libcxx/include/__algorithm/min.h (+3-3)
  • (modified) libcxx/include/__algorithm/min_element.h (+1-1)
  • (modified) libcxx/include/__algorithm/next_permutation.h (+1-1)
  • (modified) libcxx/include/__algorithm/nth_element.h (+4-4)
  • (modified) libcxx/include/__algorithm/partial_sort.h (+1-1)
  • (modified) libcxx/include/__algorithm/partial_sort_copy.h (+1-1)
  • (modified) libcxx/include/__algorithm/partition_point.h (+3-3)
  • (modified) libcxx/include/__algorithm/prev_permutation.h (+1-1)
  • (modified) libcxx/include/__algorithm/remove.h (+2-2)
  • (modified) libcxx/include/__algorithm/remove_if.h (+2-2)
  • (modified) libcxx/include/__algorithm/rotate.h (+5-5)
  • (modified) libcxx/include/__algorithm/rotate_copy.h (+1-1)
  • (modified) libcxx/include/__algorithm/sample.h (+2-2)
  • (modified) libcxx/include/__algorithm/shift_left.h (+1-1)
  • (modified) libcxx/include/__algorithm/shift_right.h (+5-5)
  • (modified) libcxx/include/__algorithm/sift_down.h (+1-1)
  • (modified) libcxx/include/__algorithm/stable_partition.h (+2-2)
  • (modified) libcxx/include/__algorithm/stable_sort.h (+1-1)
  • (modified) libcxx/include/__compare/compare_partial_order_fallback.h (+15-15)
  • (modified) libcxx/include/__compare/compare_strong_order_fallback.h (+12-12)
  • (modified) libcxx/include/__compare/compare_three_way.h (+2-2)
  • (modified) libcxx/include/__compare/compare_weak_order_fallback.h (+12-12)
  • (modified) libcxx/include/__compare/partial_order.h (+12-12)
  • (modified) libcxx/include/__compare/strong_order.h (+23-23)
  • (modified) libcxx/include/__compare/weak_order.h (+16-16)
  • (modified) libcxx/include/__concepts/assignable.h (+1-1)
  • (modified) libcxx/include/__concepts/boolean_testable.h (+1-1)
  • (modified) libcxx/include/__concepts/invocable.h (+1-1)
  • (modified) libcxx/include/__concepts/swappable.h (+8-8)
  • (modified) libcxx/include/__config (+3-3)
  • (modified) libcxx/include/__coroutine/coroutine_handle.h (+1-1)
  • (modified) libcxx/include/__filesystem/directory_entry.h (+3-3)
  • (modified) libcxx/include/__filesystem/directory_iterator.h (+3-3)
  • (modified) libcxx/include/__filesystem/filesystem_error.h (+1-1)
  • (modified) libcxx/include/__filesystem/path.h (+33-33)
  • (modified) libcxx/include/__filesystem/recursive_directory_iterator.h (+3-3)
  • (modified) libcxx/include/__filesystem/u8path.h (+3-3)
  • (modified) libcxx/include/__format/buffer.h (+21-21)
  • (modified) libcxx/include/__format/format_arg.h (+20-20)
  • (modified) libcxx/include/__format/format_context.h (+12-12)
  • (modified) libcxx/include/__format/format_functions.h (+62-62)
  • (modified) libcxx/include/__format/formatter_floating_point.h (+31-31)
  • (modified) libcxx/include/__format/formatter_integral.h (+11-11)
  • (modified) libcxx/include/__format/formatter_output.h (+25-25)
  • (modified) libcxx/include/__format/parser_std_format_spec.h (+2-2)
  • (modified) libcxx/include/__format/write_escaped.h (+4-4)
  • (modified) libcxx/include/__functional/bind.h (+16-16)
  • (modified) libcxx/include/__functional/bind_back.h (+6-6)
  • (modified) libcxx/include/__functional/bind_front.h (+4-4)
  • (modified) libcxx/include/__functional/compose.h (+6-6)
  • (modified) libcxx/include/__functional/function.h (+40-40)
  • (modified) libcxx/include/__functional/hash.h (+2-2)
  • (modified) libcxx/include/__functional/identity.h (+1-1)
  • (modified) libcxx/include/__functional/invoke.h (+1-1)
  • (modified) libcxx/include/__functional/not_fn.h (+4-4)
  • (modified) libcxx/include/__functional/operations.h (+57-57)
  • (modified) libcxx/include/__functional/perfect_forward.h (+13-13)
  • (modified) libcxx/include/__functional/ranges_operations.h (+12-12)
  • (modified) libcxx/include/__functional/reference_wrapper.h (+1-1)
  • (modified) libcxx/include/__functional/weak_result_type.h (+1-1)
  • (modified) libcxx/include/__hash_table (+48-48)
  • (modified) libcxx/include/__iterator/advance.h (+4-4)
  • (modified) libcxx/include/__iterator/back_insert_iterator.h (+2-2)
  • (modified) libcxx/include/__iterator/common_iterator.h (+27-27)
  • (modified) libcxx/include/__iterator/concepts.h (+6-6)
  • (modified) libcxx/include/__iterator/counted_iterator.h (+3-3)
  • (modified) libcxx/include/__iterator/distance.h (+1-1)
  • (modified) libcxx/include/__iterator/front_insert_iterator.h (+2-2)
  • (modified) libcxx/include/__iterator/insert_iterator.h (+2-2)
  • (modified) libcxx/include/__iterator/istream_iterator.h (+2-2)
  • (modified) libcxx/include/__iterator/iter_swap.h (+7-7)
  • (modified) libcxx/include/__iterator/next.h (+1-1)
  • (modified) libcxx/include/__iterator/ostream_iterator.h (+2-2)
  • (modified) libcxx/include/__iterator/prev.h (+1-1)
  • (modified) libcxx/include/__iterator/reverse_access.h (+4-4)
  • (modified) libcxx/include/__iterator/wrap_iter.h (+2-2)
  • (modified) libcxx/include/__locale (+3-3)
  • (modified) libcxx/include/__locale_dir/locale_base_api/locale_guard.h (+1-1)
  • (modified) libcxx/include/__memory/allocation_guard.h (+1-1)
  • (modified) libcxx/include/__memory/allocator.h (+9-9)
  • (modified) libcxx/include/__memory/allocator_arg_t.h (+3-3)
  • (modified) libcxx/include/__memory/allocator_traits.h (+1-1)
  • (modified) libcxx/include/__memory/builtin_new_allocator.h (+3-3)
  • (modified) libcxx/include/__memory/pointer_traits.h (+5-5)
  • (modified) libcxx/include/__memory/ranges_construct_at.h (+4-4)
  • (modified) libcxx/include/__memory/ranges_uninitialized_algorithms.h (+12-12)
  • (modified) libcxx/include/__memory/raw_storage_iterator.h (+2-2)
  • (modified) libcxx/include/__memory/shared_ptr.h (+30-30)
  • (modified) libcxx/include/__memory/swap_allocator.h (+2-2)
  • (modified) libcxx/include/__memory/temporary_buffer.h (+2-2)
  • (modified) libcxx/include/__memory/uninitialized_algorithms.h (+37-37)
  • (modified) libcxx/include/__memory/unique_ptr.h (+12-12)
  • (modified) libcxx/include/__memory/voidify.h (+1-1)
  • (modified) libcxx/include/__mutex/once_flag.h (+2-2)
  • (modified) libcxx/include/__node_handle (+9-9)
  • (modified) libcxx/include/__numeric/accumulate.h (+2-2)
  • (modified) libcxx/include/__numeric/adjacent_difference.h (+4-4)
  • (modified) libcxx/include/__numeric/exclusive_scan.h (+3-3)
  • (modified) libcxx/include/__numeric/gcd_lcm.h (+3-3)
  • (modified) libcxx/include/__numeric/inclusive_scan.h (+2-2)
  • (modified) libcxx/include/__numeric/inner_product.h (+2-2)
  • (modified) libcxx/include/__numeric/midpoint.h (+1-1)
  • (modified) libcxx/include/__numeric/partial_sum.h (+2-2)
  • (modified) libcxx/include/__numeric/reduce.h (+2-2)
  • (modified) libcxx/include/__numeric/transform_inclusive_scan.h (+1-1)
  • (modified) libcxx/include/__numeric/transform_reduce.h (+2-2)
  • (modified) libcxx/include/__random/binomial_distribution.h (+3-3)
  • (modified) libcxx/include/__random/cauchy_distribution.h (+1-1)
  • (modified) libcxx/include/__random/discard_block_engine.h (+1-1)
  • (modified) libcxx/include/__random/discrete_distribution.h (+4-4)
  • (modified) libcxx/include/__random/exponential_distribution.h (+2-2)
  • (modified) libcxx/include/__random/extreme_value_distribution.h (+1-1)
  • (modified) libcxx/include/__random/gamma_distribution.h (+5-5)
  • (modified) libcxx/include/__random/independent_bits_engine.h (+1-1)
  • (modified) libcxx/include/__random/lognormal_distribution.h (+2-2)
  • (modified) libcxx/include/__random/mersenne_twister_engine.h (+11-11)
  • (modified) libcxx/include/__random/normal_distribution.h (+1-1)
  • (modified) libcxx/include/__random/piecewise_constant_distribution.h (+3-3)
  • (modified) libcxx/include/__random/piecewise_linear_distribution.h (+2-2)
  • (modified) libcxx/include/__random/poisson_distribution.h (+15-15)
  • (modified) libcxx/include/__random/seed_seq.h (+3-3)
  • (modified) libcxx/include/__random/shuffle_order_engine.h (+2-2)
  • (modified) libcxx/include/__random/student_t_distribution.h (+1-1)
  • (modified) libcxx/include/__random/subtract_with_carry_engine.h (+11-11)
  • (modified) libcxx/include/__random/uniform_real_distribution.h (+1-1)
  • (modified) libcxx/include/__random/weibull_distribution.h (+1-1)
  • (modified) libcxx/include/__split_buffer (+59-59)
  • (modified) libcxx/include/__string/char_traits.h (+2-2)
  • (modified) libcxx/include/__thread/thread.h (+9-9)
  • (modified) libcxx/include/__threading_support (+2-2)
  • (modified) libcxx/include/__tree (+94-94)
  • (modified) libcxx/include/__type_traits/invoke.h (+2-2)
  • (modified) libcxx/include/__type_traits/is_nothrow_constructible.h (+1-1)
  • (modified) libcxx/include/__type_traits/is_nothrow_convertible.h (+1-1)
  • (modified) libcxx/include/__utility/cmp.h (+6-6)
  • (modified) libcxx/include/__utility/exchange.h (+2-2)
  • (modified) libcxx/include/__utility/swap.h (+3-3)
  • (modified) libcxx/include/__utility/to_underlying.h (+1-1)
  • (modified) libcxx/include/any (+18-18)
  • (modified) libcxx/include/array (+13-13)
  • (modified) libcxx/include/barrier (+2-2)
  • (modified) libcxx/include/bitset (+15-15)
  • (modified) libcxx/include/complex (+3-3)
  • (modified) libcxx/include/condition_variable (+1-1)
  • (modified) libcxx/include/deque (+106-106)
  • (modified) libcxx/include/experimental/__config (-3)
  • (modified) libcxx/include/experimental/__memory (+4-4)
  • (modified) libcxx/include/experimental/iterator (+3-3)
  • (modified) libcxx/include/experimental/propagate_const (+77-77)
  • (modified) libcxx/include/ext/hash_map (+7-7)
  • (modified) libcxx/include/ext/hash_set (+3-3)
  • (modified) libcxx/include/forward_list (+20-20)
  • (modified) libcxx/include/fstream (+27-27)
  • (modified) libcxx/include/future (+77-77)
  • (modified) libcxx/include/iomanip (+1-1)
  • (modified) libcxx/include/ios (+4-4)
  • (modified) libcxx/include/istream (+21-21)
  • (modified) libcxx/include/limits (+1-1)
  • (modified) libcxx/include/list (+32-32)
  • (modified) libcxx/include/locale (+16-16)
  • (modified) libcxx/include/map (+76-76)
  • (modified) libcxx/include/mutex (+3-3)
  • (modified) libcxx/include/new (+1-1)
  • (modified) libcxx/include/optional (+55-55)
  • (modified) libcxx/include/ostream (+11-11)
  • (modified) libcxx/include/queue (+35-35)
  • (modified) libcxx/include/regex (+106-106)
  • (modified) libcxx/include/scoped_allocator (+24-24)
  • (modified) libcxx/include/set (+30-30)
  • (modified) libcxx/include/shared_mutex (+8-8)
  • (modified) libcxx/include/span (+6-6)
  • (modified) libcxx/include/sstream (+16-16)
  • (modified) libcxx/include/stack (+9-9)
  • (modified) libcxx/include/stdexcept (+4-4)
  • (modified) libcxx/include/streambuf (+10-10)
  • (modified) libcxx/include/string_view (+7-7)
  • (modified) libcxx/include/strstream (+14-14)
  • (modified) libcxx/include/tuple (+69-69)
  • (modified) libcxx/include/unordered_map (+58-58)
  • (modified) libcxx/include/unordered_set (+23-23)
  • (modified) libcxx/include/valarray (+10-10)
  • (modified) libcxx/include/variant (+97-97)
  • (modified) libcxx/src/chrono.cpp (+2-2)
  • (modified) libcxx/src/include/to_chars_floating_point.h (+21-21)
  • (modified) libcxx/src/ios.cpp (+17-17)
  • (modified) libcxx/src/iostream.cpp (+2-2)
  • (modified) libcxx/src/locale.cpp (+18-18)
  • (modified) libcxx/src/regex.cpp (+2-2)
  • (modified) libcxx/src/std_stream.h (+6-6)
  • (modified) libcxx/src/strstream.cpp (+6-6)
  • (modified) libcxx/src/support/win32/thread_win32.cpp (+1-1)
  • (modified) libcxx/src/vector.cpp (+2-2)
diff --git a/libcxx/docs/Contributing.rst b/libcxx/docs/Contributing.rst
index 4cd0568989f85..3ff8c15a969b0 100644
--- a/libcxx/docs/Contributing.rst
+++ b/libcxx/docs/Contributing.rst
@@ -67,7 +67,6 @@ avoid invoking a user-defined ``operator,``, make sure to cast the result to
 In general, try to follow the style of existing code. There are a few
 exceptions:
 
-- ``_VSTD::foo`` is no longer used in new code. Use ``std::foo`` instead.
 - Prefer ``using foo = int`` over ``typedef int foo``. The compilers supported
   by libc++ accept alias declarations in all standard modes.
 
diff --git a/libcxx/include/__algorithm/clamp.h b/libcxx/include/__algorithm/clamp.h
index fc08827919403..1631b2673c3fa 100644
--- a/libcxx/include/__algorithm/clamp.h
+++ b/libcxx/include/__algorithm/clamp.h
@@ -35,7 +35,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI constexpr const _Tp&
 clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
       _LIBCPP_LIFETIMEBOUND const _Tp& __lo,
       _LIBCPP_LIFETIMEBOUND const _Tp& __hi) {
-  return _VSTD::clamp(__v, __lo, __hi, __less<>());
+  return std::clamp(__v, __lo, __hi, __less<>());
 }
 #endif
 
diff --git a/libcxx/include/__algorithm/copy_n.h b/libcxx/include/__algorithm/copy_n.h
index 19f3f729c3d08..1707e26688c65 100644
--- a/libcxx/include/__algorithm/copy_n.h
+++ b/libcxx/include/__algorithm/copy_n.h
@@ -28,7 +28,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 _OutputIterator
 copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result)
 {
-    typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
+    typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
     _IntegralSize __n = __orig_n;
     if (__n > 0)
     {
@@ -51,9 +51,9 @@ _OutputIterator
 copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result)
 {
     typedef typename iterator_traits<_InputIterator>::difference_type difference_type;
-    typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
+    typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
     _IntegralSize __n = __orig_n;
-    return _VSTD::copy(__first, __first + difference_type(__n), __result);
+    return std::copy(__first, __first + difference_type(__n), __result);
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/equal.h b/libcxx/include/__algorithm/equal.h
index ca2e49ca5679a..fb358613e2101 100644
--- a/libcxx/include/__algorithm/equal.h
+++ b/libcxx/include/__algorithm/equal.h
@@ -107,7 +107,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
 __equal(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, _RandomAccessIterator2 __first2,
         _RandomAccessIterator2 __last2, _BinaryPredicate __pred, random_access_iterator_tag,
         random_access_iterator_tag) {
-  if (_VSTD::distance(__first1, __last1) != _VSTD::distance(__first2, __last2))
+  if (std::distance(__first1, __last1) != std::distance(__first2, __last2))
     return false;
   __identity __proj;
   return std::__equal_impl(
@@ -124,7 +124,7 @@ template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
 equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
       _BinaryPredicate __pred) {
-  return _VSTD::__equal<_BinaryPredicate&>(
+  return std::__equal<_BinaryPredicate&>(
       __first1, __last1, __first2, __last2, __pred, typename iterator_traits<_InputIterator1>::iterator_category(),
       typename iterator_traits<_InputIterator2>::iterator_category());
 }
diff --git a/libcxx/include/__algorithm/fill.h b/libcxx/include/__algorithm/fill.h
index e59c4963851d3..360e2c3c3c858 100644
--- a/libcxx/include/__algorithm/fill.h
+++ b/libcxx/include/__algorithm/fill.h
@@ -35,7 +35,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 void
 __fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value, random_access_iterator_tag)
 {
-    _VSTD::fill_n(__first, __last - __first, __value);
+    std::fill_n(__first, __last - __first, __value);
 }
 
 template <class _ForwardIterator, class _Tp>
@@ -43,7 +43,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 void
 fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
 {
-    _VSTD::__fill(__first, __last, __value, typename iterator_traits<_ForwardIterator>::iterator_category());
+    std::__fill(__first, __last, __value, typename iterator_traits<_ForwardIterator>::iterator_category());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/fill_n.h b/libcxx/include/__algorithm/fill_n.h
index c2dfbf1197589..89681a342ea78 100644
--- a/libcxx/include/__algorithm/fill_n.h
+++ b/libcxx/include/__algorithm/fill_n.h
@@ -36,7 +36,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 _OutputIterator
 fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
 {
-   return _VSTD::__fill_n(__first, _VSTD::__convert_to_integral(__n), __value);
+   return std::__fill_n(__first, std::__convert_to_integral(__n), __value);
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/find_first_of.h b/libcxx/include/__algorithm/find_first_of.h
index c386687d46ffe..15a147242b0e5 100644
--- a/libcxx/include/__algorithm/find_first_of.h
+++ b/libcxx/include/__algorithm/find_first_of.h
@@ -38,7 +38,7 @@ template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredica
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator1
 find_first_of(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
               _ForwardIterator2 __last2, _BinaryPredicate __pred) {
-  return _VSTD::__find_first_of_ce(__first1, __last1, __first2, __last2, __pred);
+  return std::__find_first_of_ce(__first1, __last1, __first2, __last2, __pred);
 }
 
 template <class _ForwardIterator1, class _ForwardIterator2>
diff --git a/libcxx/include/__algorithm/for_each_n.h b/libcxx/include/__algorithm/for_each_n.h
index 7006bafe73046..a72a0912cfa52 100644
--- a/libcxx/include/__algorithm/for_each_n.h
+++ b/libcxx/include/__algorithm/for_each_n.h
@@ -25,7 +25,7 @@ template <class _InputIterator, class _Size, class _Function>
 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator for_each_n(_InputIterator __first,
                                                                                          _Size __orig_n,
                                                                                          _Function __f) {
-  typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
+  typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
   _IntegralSize __n = __orig_n;
   while (__n > 0) {
     __f(*__first);
diff --git a/libcxx/include/__algorithm/generate_n.h b/libcxx/include/__algorithm/generate_n.h
index 1c8194c3c071b..5719826e93edf 100644
--- a/libcxx/include/__algorithm/generate_n.h
+++ b/libcxx/include/__algorithm/generate_n.h
@@ -23,7 +23,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 _OutputIterator
 generate_n(_OutputIterator __first, _Size __orig_n, _Generator __gen)
 {
-    typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
+    typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
     _IntegralSize __n = __orig_n;
     for (; __n > 0; ++__first, (void) --__n)
         *__first = __gen();
diff --git a/libcxx/include/__algorithm/inplace_merge.h b/libcxx/include/__algorithm/inplace_merge.h
index a3dad4668cbd9..d49c2e5cedda2 100644
--- a/libcxx/include/__algorithm/inplace_merge.h
+++ b/libcxx/include/__algorithm/inplace_merge.h
@@ -224,10 +224,10 @@ __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle,
     typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type;
     difference_type __len1 = _IterOps<_AlgPolicy>::distance(__first, __middle);
     difference_type __len2 = _IterOps<_AlgPolicy>::distance(__middle, __last);
-    difference_type __buf_size = _VSTD::min(__len1, __len2);
+    difference_type __buf_size = std::min(__len1, __len2);
 // TODO: Remove the use of std::get_temporary_buffer
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
-    pair<value_type*, ptrdiff_t> __buf = _VSTD::get_temporary_buffer<value_type>(__buf_size);
+    pair<value_type*, ptrdiff_t> __buf = std::get_temporary_buffer<value_type>(__buf_size);
 _LIBCPP_SUPPRESS_DEPRECATED_POP
     unique_ptr<value_type, __return_temporary_buffer> __h(__buf.first);
     return std::__inplace_merge<_AlgPolicy>(
diff --git a/libcxx/include/__algorithm/is_heap.h b/libcxx/include/__algorithm/is_heap.h
index 77cbe019ec0ba..dd78031579ec9 100644
--- a/libcxx/include/__algorithm/is_heap.h
+++ b/libcxx/include/__algorithm/is_heap.h
@@ -36,7 +36,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 bool
 is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
 {
-    return _VSTD::is_heap(__first, __last, __less<>());
+    return std::is_heap(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/is_heap_until.h b/libcxx/include/__algorithm/is_heap_until.h
index d7131114bd60d..85f70e649f568 100644
--- a/libcxx/include/__algorithm/is_heap_until.h
+++ b/libcxx/include/__algorithm/is_heap_until.h
@@ -58,7 +58,7 @@ template<class _RandomAccessIterator>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
 is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last)
 {
-    return _VSTD::__is_heap_until(__first, __last, __less<>());
+    return std::__is_heap_until(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/is_sorted.h b/libcxx/include/__algorithm/is_sorted.h
index 69374962c105a..0003097b362c5 100644
--- a/libcxx/include/__algorithm/is_sorted.h
+++ b/libcxx/include/__algorithm/is_sorted.h
@@ -27,7 +27,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 bool
 is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
-    return _VSTD::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp) == __last;
+    return std::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp) == __last;
 }
 
 template<class _ForwardIterator>
@@ -36,7 +36,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 bool
 is_sorted(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::is_sorted(__first, __last, __less<>());
+    return std::is_sorted(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/is_sorted_until.h b/libcxx/include/__algorithm/is_sorted_until.h
index 890b93631c46e..aeb3f1c8be989 100644
--- a/libcxx/include/__algorithm/is_sorted_until.h
+++ b/libcxx/include/__algorithm/is_sorted_until.h
@@ -41,14 +41,14 @@ template <class _ForwardIterator, class _Compare>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
 is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
-    return _VSTD::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp);
+    return std::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp);
 }
 
 template<class _ForwardIterator>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
 is_sorted_until(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::is_sorted_until(__first, __last, __less<>());
+    return std::is_sorted_until(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/lexicographical_compare.h b/libcxx/include/__algorithm/lexicographical_compare.h
index 9a5b657b7f91b..1ee189a259025 100644
--- a/libcxx/include/__algorithm/lexicographical_compare.h
+++ b/libcxx/include/__algorithm/lexicographical_compare.h
@@ -42,7 +42,7 @@ bool
 lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
                         _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
 {
-    return _VSTD::__lexicographical_compare<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __comp);
+    return std::__lexicographical_compare<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __comp);
 }
 
 template <class _InputIterator1, class _InputIterator2>
@@ -52,7 +52,7 @@ bool
 lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
                         _InputIterator2 __first2, _InputIterator2 __last2)
 {
-    return _VSTD::lexicographical_compare(__first1, __last1, __first2, __last2, __less<>());
+    return std::lexicographical_compare(__first1, __last1, __first2, __last2, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/max.h b/libcxx/include/__algorithm/max.h
index 38ef792f0cf20..183a4e9cac062 100644
--- a/libcxx/include/__algorithm/max.h
+++ b/libcxx/include/__algorithm/max.h
@@ -39,7 +39,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 const _Tp&
 max(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b)
 {
-    return _VSTD::max(__a, __b, __less<>());
+    return std::max(__a, __b, __less<>());
 }
 
 #ifndef _LIBCPP_CXX03_LANG
@@ -50,7 +50,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 _Tp
 max(initializer_list<_Tp> __t, _Compare __comp)
 {
-    return *_VSTD::__max_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
+    return *std::__max_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
 }
 
 template<class _Tp>
@@ -59,7 +59,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 _Tp
 max(initializer_list<_Tp> __t)
 {
-    return *_VSTD::max_element(__t.begin(), __t.end(), __less<>());
+    return *std::max_element(__t.begin(), __t.end(), __less<>());
 }
 
 #endif // _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/__algorithm/max_element.h b/libcxx/include/__algorithm/max_element.h
index 8fd52c77723c0..a2dc9707c00b8 100644
--- a/libcxx/include/__algorithm/max_element.h
+++ b/libcxx/include/__algorithm/max_element.h
@@ -40,7 +40,7 @@ template <class _ForwardIterator, class _Compare>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
 max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
-    return _VSTD::__max_element<__comp_ref_type<_Compare> >(__first, __last, __comp);
+    return std::__max_element<__comp_ref_type<_Compare> >(__first, __last, __comp);
 }
 
 
@@ -48,7 +48,7 @@ template <class _ForwardIterator>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
 max_element(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::max_element(__first, __last, __less<>());
+    return std::max_element(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/merge.h b/libcxx/include/__algorithm/merge.h
index ff02e562c3ddb..8a6021f1880b2 100644
--- a/libcxx/include/__algorithm/merge.h
+++ b/libcxx/include/__algorithm/merge.h
@@ -30,7 +30,7 @@ __merge(_InputIterator1 __first1, _InputIterator1 __last1,
     for (; __first1 != __last1; ++__result)
     {
         if (__first2 == __last2)
-            return _VSTD::copy(__first1, __last1, __result);
+            return std::copy(__first1, __last1, __result);
         if (__comp(*__first2, *__first1))
         {
             *__result = *__first2;
@@ -42,7 +42,7 @@ __merge(_InputIterator1 __first1, _InputIterator1 __last1,
             ++__first1;
         }
     }
-    return _VSTD::copy(__first2, __last2, __result);
+    return std::copy(__first2, __last2, __result);
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
@@ -51,7 +51,7 @@ _OutputIterator
 merge(_InputIterator1 __first1, _InputIterator1 __last1,
       _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
 {
-    return _VSTD::__merge<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __comp);
+    return std::__merge<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __comp);
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
@@ -60,7 +60,7 @@ _OutputIterator
 merge(_InputIterator1 __first1, _InputIterator1 __last1,
       _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result)
 {
-    return _VSTD::merge(__first1, __last1, __first2, __last2, __result, __less<>());
+    return std::merge(__first1, __last1, __first2, __last2, __result, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/min.h b/libcxx/include/__algorithm/min.h
index 542c90a6decc5..58574517132f2 100644
--- a/libcxx/include/__algorithm/min.h
+++ b/libcxx/include/__algorithm/min.h
@@ -39,7 +39,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 const _Tp&
 min(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b)
 {
-    return _VSTD::min(__a, __b, __less<>());
+    return std::min(__a, __b, __less<>());
 }
 
 #ifndef _LIBCPP_CXX03_LANG
@@ -50,7 +50,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 _Tp
 min(initializer_list<_Tp> __t, _Compare __comp)
 {
-    return *_VSTD::__min_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
+    return *std::__min_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
 }
 
 template<class _Tp>
@@ -59,7 +59,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 _Tp
 min(initializer_list<_Tp> __t)
 {
-    return *_VSTD::min_element(__t.begin(), __t.end(), __less<>());
+    return *std::min_element(__t.begin(), __t.end(), __less<>());
 }
 
 #endif // _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/__algorithm/min_element.h b/libcxx/include/__algorithm/min_element.h
index 45f3e85ef92d9..0ce7af69333ff 100644
--- a/libcxx/include/__algorithm/min_element.h
+++ b/libcxx/include/__algorithm/min_element.h
@@ -64,7 +64,7 @@ template <class _ForwardIterator>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
 min_element(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::min_element(__first, __last, __less<>());
+    return std::min_element(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/next_permutation.h b/libcxx/include/__algorithm/next_permutation.h
index bfa63ef169706..ebaed15ae2ad0 100644
--- a/libcxx/include/__algorithm/next_permutation.h
+++ b/libcxx/include/__algorithm/next_permutation.h
@@ -69,7 +69,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 bool
 next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
 {
-    return _VSTD::next_permutation(__first, __last, __less<>());
+    return std::next_permutation(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/nth_element.h b/libcxx/include/__algorithm/nth_element.h
index ebd1cbf76143d..6b3b2bb434d5f 100644
--- a/libcxx/include/__algorithm/nth_element.h
+++ b/libcxx/include/__algorithm/nth_element.h
@@ -92,7 +92,7 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
         if (!__comp(*__i, *__m))  // if *__first == *__m
         {
             // *__first == *__m, *__first doesn't go in first part
-            if (_VSTD::__nth_element_find_guard<_Compare>(__i, __j, __m, __comp)) {
+            if (std::__nth_element_find_guard<_Compare>(__i, __j, __m, __comp)) {
                 _Ops::iter_swap(__i, __j);
                 ++__n_swaps;
             } else {
@@ -142,7 +142,7 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
                     return;
                 }
                 // __nth_element the second part
-                // _VSTD::__nth_element<_Compare>(__i, __nth, __last, __comp);
+                // std::__nth_element<_Compare>(__i, __nth, __last, __comp);
                 __first = __i;
                 continue;
             }
@@ -228,12 +228,12 @@ __nth_element(_RandomAccessIterator __first, ...
[truncated]

@ldionne
Copy link
Member Author

ldionne commented Dec 4, 2023

CC @llvm/libcxx-vendors for awareness, since this may cause a few downstream conflicts. This is the follow-up to #74095.

Copy link

github-actions bot commented Dec 4, 2023

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff 9eea7441831328a56bb0f91e7a15b7c575a42930 017113921778192a962f7b419e522478c14de7b6 -- libcxx/include/__algorithm/clamp.h libcxx/include/__algorithm/copy_n.h libcxx/include/__algorithm/equal.h libcxx/include/__algorithm/fill.h libcxx/include/__algorithm/fill_n.h libcxx/include/__algorithm/find_first_of.h libcxx/include/__algorithm/for_each_n.h libcxx/include/__algorithm/generate_n.h libcxx/include/__algorithm/inplace_merge.h libcxx/include/__algorithm/is_heap.h libcxx/include/__algorithm/is_heap_until.h libcxx/include/__algorithm/is_sorted.h libcxx/include/__algorithm/is_sorted_until.h libcxx/include/__algorithm/lexicographical_compare.h libcxx/include/__algorithm/max.h libcxx/include/__algorithm/max_element.h libcxx/include/__algorithm/merge.h libcxx/include/__algorithm/min.h libcxx/include/__algorithm/min_element.h libcxx/include/__algorithm/next_permutation.h libcxx/include/__algorithm/nth_element.h libcxx/include/__algorithm/partial_sort.h libcxx/include/__algorithm/partial_sort_copy.h libcxx/include/__algorithm/partition_point.h libcxx/include/__algorithm/prev_permutation.h libcxx/include/__algorithm/remove.h libcxx/include/__algorithm/remove_if.h libcxx/include/__algorithm/rotate.h libcxx/include/__algorithm/rotate_copy.h libcxx/include/__algorithm/sample.h libcxx/include/__algorithm/shift_left.h libcxx/include/__algorithm/shift_right.h libcxx/include/__algorithm/sift_down.h libcxx/include/__algorithm/stable_partition.h libcxx/include/__algorithm/stable_sort.h libcxx/include/__compare/compare_partial_order_fallback.h libcxx/include/__compare/compare_strong_order_fallback.h libcxx/include/__compare/compare_three_way.h libcxx/include/__compare/compare_weak_order_fallback.h libcxx/include/__compare/partial_order.h libcxx/include/__compare/strong_order.h libcxx/include/__compare/weak_order.h libcxx/include/__concepts/assignable.h libcxx/include/__concepts/boolean_testable.h libcxx/include/__concepts/invocable.h libcxx/include/__concepts/swappable.h libcxx/include/__config libcxx/include/__coroutine/coroutine_handle.h libcxx/include/__filesystem/directory_entry.h libcxx/include/__filesystem/directory_iterator.h libcxx/include/__filesystem/filesystem_error.h libcxx/include/__filesystem/path.h libcxx/include/__filesystem/recursive_directory_iterator.h libcxx/include/__filesystem/u8path.h libcxx/include/__format/buffer.h libcxx/include/__format/format_arg.h libcxx/include/__format/format_context.h libcxx/include/__format/format_functions.h libcxx/include/__format/formatter_floating_point.h libcxx/include/__format/formatter_integral.h libcxx/include/__format/formatter_output.h libcxx/include/__format/parser_std_format_spec.h libcxx/include/__format/write_escaped.h libcxx/include/__functional/bind.h libcxx/include/__functional/bind_back.h libcxx/include/__functional/bind_front.h libcxx/include/__functional/compose.h libcxx/include/__functional/function.h libcxx/include/__functional/hash.h libcxx/include/__functional/identity.h libcxx/include/__functional/invoke.h libcxx/include/__functional/not_fn.h libcxx/include/__functional/operations.h libcxx/include/__functional/perfect_forward.h libcxx/include/__functional/ranges_operations.h libcxx/include/__functional/reference_wrapper.h libcxx/include/__functional/weak_result_type.h libcxx/include/__hash_table libcxx/include/__iterator/advance.h libcxx/include/__iterator/back_insert_iterator.h libcxx/include/__iterator/common_iterator.h libcxx/include/__iterator/concepts.h libcxx/include/__iterator/counted_iterator.h libcxx/include/__iterator/distance.h libcxx/include/__iterator/front_insert_iterator.h libcxx/include/__iterator/insert_iterator.h libcxx/include/__iterator/istream_iterator.h libcxx/include/__iterator/iter_swap.h libcxx/include/__iterator/next.h libcxx/include/__iterator/ostream_iterator.h libcxx/include/__iterator/prev.h libcxx/include/__iterator/reverse_access.h libcxx/include/__iterator/wrap_iter.h libcxx/include/__locale libcxx/include/__locale_dir/locale_base_api/locale_guard.h libcxx/include/__memory/allocation_guard.h libcxx/include/__memory/allocator.h libcxx/include/__memory/allocator_arg_t.h libcxx/include/__memory/allocator_traits.h libcxx/include/__memory/builtin_new_allocator.h libcxx/include/__memory/pointer_traits.h libcxx/include/__memory/ranges_construct_at.h libcxx/include/__memory/ranges_uninitialized_algorithms.h libcxx/include/__memory/raw_storage_iterator.h libcxx/include/__memory/shared_ptr.h libcxx/include/__memory/swap_allocator.h libcxx/include/__memory/temporary_buffer.h libcxx/include/__memory/uninitialized_algorithms.h libcxx/include/__memory/unique_ptr.h libcxx/include/__memory/voidify.h libcxx/include/__mutex/once_flag.h libcxx/include/__node_handle libcxx/include/__numeric/accumulate.h libcxx/include/__numeric/adjacent_difference.h libcxx/include/__numeric/exclusive_scan.h libcxx/include/__numeric/gcd_lcm.h libcxx/include/__numeric/inclusive_scan.h libcxx/include/__numeric/inner_product.h libcxx/include/__numeric/midpoint.h libcxx/include/__numeric/partial_sum.h libcxx/include/__numeric/reduce.h libcxx/include/__numeric/transform_inclusive_scan.h libcxx/include/__numeric/transform_reduce.h libcxx/include/__random/binomial_distribution.h libcxx/include/__random/cauchy_distribution.h libcxx/include/__random/discard_block_engine.h libcxx/include/__random/discrete_distribution.h libcxx/include/__random/exponential_distribution.h libcxx/include/__random/extreme_value_distribution.h libcxx/include/__random/gamma_distribution.h libcxx/include/__random/independent_bits_engine.h libcxx/include/__random/lognormal_distribution.h libcxx/include/__random/mersenne_twister_engine.h libcxx/include/__random/normal_distribution.h libcxx/include/__random/piecewise_constant_distribution.h libcxx/include/__random/piecewise_linear_distribution.h libcxx/include/__random/poisson_distribution.h libcxx/include/__random/seed_seq.h libcxx/include/__random/shuffle_order_engine.h libcxx/include/__random/student_t_distribution.h libcxx/include/__random/subtract_with_carry_engine.h libcxx/include/__random/uniform_real_distribution.h libcxx/include/__random/weibull_distribution.h libcxx/include/__split_buffer libcxx/include/__string/char_traits.h libcxx/include/__thread/thread.h libcxx/include/__threading_support libcxx/include/__tree libcxx/include/__type_traits/invoke.h libcxx/include/__type_traits/is_nothrow_constructible.h libcxx/include/__type_traits/is_nothrow_convertible.h libcxx/include/__utility/cmp.h libcxx/include/__utility/exchange.h libcxx/include/__utility/swap.h libcxx/include/__utility/to_underlying.h libcxx/include/any libcxx/include/array libcxx/include/barrier libcxx/include/bitset libcxx/include/complex libcxx/include/condition_variable libcxx/include/deque libcxx/include/experimental/__config libcxx/include/experimental/__memory libcxx/include/experimental/iterator libcxx/include/experimental/propagate_const libcxx/include/ext/hash_map libcxx/include/ext/hash_set libcxx/include/forward_list libcxx/include/fstream libcxx/include/future libcxx/include/iomanip libcxx/include/ios libcxx/include/istream libcxx/include/limits libcxx/include/list libcxx/include/locale libcxx/include/map libcxx/include/mutex libcxx/include/new libcxx/include/optional libcxx/include/ostream libcxx/include/queue libcxx/include/regex libcxx/include/scoped_allocator libcxx/include/set libcxx/include/shared_mutex libcxx/include/span libcxx/include/sstream libcxx/include/stack libcxx/include/stdexcept libcxx/include/streambuf libcxx/include/string_view libcxx/include/strstream libcxx/include/tuple libcxx/include/unordered_map libcxx/include/unordered_set libcxx/include/valarray libcxx/include/variant libcxx/src/chrono.cpp libcxx/src/include/to_chars_floating_point.h libcxx/src/ios.cpp libcxx/src/iostream.cpp libcxx/src/locale.cpp libcxx/src/regex.cpp libcxx/src/std_stream.h libcxx/src/strstream.cpp libcxx/src/support/win32/thread_win32.cpp libcxx/src/vector.cpp
View the diff from clang-format here.
diff --git a/libcxx/include/__algorithm/copy_n.h b/libcxx/include/__algorithm/copy_n.h
index 1707e26688..cd7307f946 100644
--- a/libcxx/include/__algorithm/copy_n.h
+++ b/libcxx/include/__algorithm/copy_n.h
@@ -28,18 +28,16 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 _OutputIterator
 copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result)
 {
-    typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
-    _IntegralSize __n = __orig_n;
-    if (__n > 0)
-    {
-        *__result = *__first;
-        ++__result;
-        for (--__n; __n > 0; --__n)
-        {
-            ++__first;
-            *__result = *__first;
-            ++__result;
-        }
+  typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
+  _IntegralSize __n = __orig_n;
+  if (__n > 0) {
+    *__result = *__first;
+    ++__result;
+    for (--__n; __n > 0; --__n) {
+      ++__first;
+      *__result = *__first;
+      ++__result;
+    }
     }
     return __result;
 }
diff --git a/libcxx/include/__algorithm/equal.h b/libcxx/include/__algorithm/equal.h
index fb358613e2..f8bb196194 100644
--- a/libcxx/include/__algorithm/equal.h
+++ b/libcxx/include/__algorithm/equal.h
@@ -125,7 +125,12 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
       _BinaryPredicate __pred) {
   return std::__equal<_BinaryPredicate&>(
-      __first1, __last1, __first2, __last2, __pred, typename iterator_traits<_InputIterator1>::iterator_category(),
+      __first1,
+      __last1,
+      __first2,
+      __last2,
+      __pred,
+      typename iterator_traits<_InputIterator1>::iterator_category(),
       typename iterator_traits<_InputIterator2>::iterator_category());
 }
 
diff --git a/libcxx/include/__algorithm/fill.h b/libcxx/include/__algorithm/fill.h
index 360e2c3c3c..3ebfa4dcb2 100644
--- a/libcxx/include/__algorithm/fill.h
+++ b/libcxx/include/__algorithm/fill.h
@@ -35,7 +35,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 void
 __fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value, random_access_iterator_tag)
 {
-    std::fill_n(__first, __last - __first, __value);
+  std::fill_n(__first, __last - __first, __value);
 }
 
 template <class _ForwardIterator, class _Tp>
@@ -43,7 +43,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 void
 fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
 {
-    std::__fill(__first, __last, __value, typename iterator_traits<_ForwardIterator>::iterator_category());
+  std::__fill(__first, __last, __value, typename iterator_traits<_ForwardIterator>::iterator_category());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/fill_n.h b/libcxx/include/__algorithm/fill_n.h
index 89681a342e..c7d470256a 100644
--- a/libcxx/include/__algorithm/fill_n.h
+++ b/libcxx/include/__algorithm/fill_n.h
@@ -36,7 +36,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 _OutputIterator
 fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
 {
-   return std::__fill_n(__first, std::__convert_to_integral(__n), __value);
+  return std::__fill_n(__first, std::__convert_to_integral(__n), __value);
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/generate_n.h b/libcxx/include/__algorithm/generate_n.h
index 5719826e93..034bf73897 100644
--- a/libcxx/include/__algorithm/generate_n.h
+++ b/libcxx/include/__algorithm/generate_n.h
@@ -23,11 +23,11 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 _OutputIterator
 generate_n(_OutputIterator __first, _Size __orig_n, _Generator __gen)
 {
-    typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
-    _IntegralSize __n = __orig_n;
-    for (; __n > 0; ++__first, (void) --__n)
-        *__first = __gen();
-    return __first;
+  typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize;
+  _IntegralSize __n = __orig_n;
+  for (; __n > 0; ++__first, (void)--__n)
+    *__first = __gen();
+  return __first;
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/inplace_merge.h b/libcxx/include/__algorithm/inplace_merge.h
index d49c2e5ced..6ff30502ee 100644
--- a/libcxx/include/__algorithm/inplace_merge.h
+++ b/libcxx/include/__algorithm/inplace_merge.h
@@ -225,10 +225,10 @@ __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle,
     difference_type __len1 = _IterOps<_AlgPolicy>::distance(__first, __middle);
     difference_type __len2 = _IterOps<_AlgPolicy>::distance(__middle, __last);
     difference_type __buf_size = std::min(__len1, __len2);
-// TODO: Remove the use of std::get_temporary_buffer
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+    // TODO: Remove the use of std::get_temporary_buffer
+    _LIBCPP_SUPPRESS_DEPRECATED_PUSH
     pair<value_type*, ptrdiff_t> __buf = std::get_temporary_buffer<value_type>(__buf_size);
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+    _LIBCPP_SUPPRESS_DEPRECATED_POP
     unique_ptr<value_type, __return_temporary_buffer> __h(__buf.first);
     return std::__inplace_merge<_AlgPolicy>(
         std::move(__first), std::move(__middle), std::move(__last), __comp, __len1, __len2, __buf.first, __buf.second);
diff --git a/libcxx/include/__algorithm/is_heap.h b/libcxx/include/__algorithm/is_heap.h
index dd78031579..6c8da28f6a 100644
--- a/libcxx/include/__algorithm/is_heap.h
+++ b/libcxx/include/__algorithm/is_heap.h
@@ -36,7 +36,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 bool
 is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
 {
-    return std::is_heap(__first, __last, __less<>());
+  return std::is_heap(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/is_heap_until.h b/libcxx/include/__algorithm/is_heap_until.h
index 85f70e649f..2276565206 100644
--- a/libcxx/include/__algorithm/is_heap_until.h
+++ b/libcxx/include/__algorithm/is_heap_until.h
@@ -58,7 +58,7 @@ template<class _RandomAccessIterator>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
 is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last)
 {
-    return std::__is_heap_until(__first, __last, __less<>());
+  return std::__is_heap_until(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/is_sorted.h b/libcxx/include/__algorithm/is_sorted.h
index 0003097b36..28b03f527b 100644
--- a/libcxx/include/__algorithm/is_sorted.h
+++ b/libcxx/include/__algorithm/is_sorted.h
@@ -27,7 +27,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 bool
 is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
-    return std::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp) == __last;
+  return std::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp) == __last;
 }
 
 template<class _ForwardIterator>
@@ -36,7 +36,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 bool
 is_sorted(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return std::is_sorted(__first, __last, __less<>());
+  return std::is_sorted(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/is_sorted_until.h b/libcxx/include/__algorithm/is_sorted_until.h
index aeb3f1c8be..2b732f50c9 100644
--- a/libcxx/include/__algorithm/is_sorted_until.h
+++ b/libcxx/include/__algorithm/is_sorted_until.h
@@ -41,14 +41,14 @@ template <class _ForwardIterator, class _Compare>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
 is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
-    return std::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp);
+  return std::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp);
 }
 
 template<class _ForwardIterator>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
 is_sorted_until(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return std::is_sorted_until(__first, __last, __less<>());
+  return std::is_sorted_until(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/lexicographical_compare.h b/libcxx/include/__algorithm/lexicographical_compare.h
index 1ee189a259..740f6dac93 100644
--- a/libcxx/include/__algorithm/lexicographical_compare.h
+++ b/libcxx/include/__algorithm/lexicographical_compare.h
@@ -42,7 +42,7 @@ bool
 lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
                         _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
 {
-    return std::__lexicographical_compare<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __comp);
+  return std::__lexicographical_compare<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __comp);
 }
 
 template <class _InputIterator1, class _InputIterator2>
@@ -52,7 +52,7 @@ bool
 lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
                         _InputIterator2 __first2, _InputIterator2 __last2)
 {
-    return std::lexicographical_compare(__first1, __last1, __first2, __last2, __less<>());
+  return std::lexicographical_compare(__first1, __last1, __first2, __last2, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/max.h b/libcxx/include/__algorithm/max.h
index 183a4e9cac..20cb99de3b 100644
--- a/libcxx/include/__algorithm/max.h
+++ b/libcxx/include/__algorithm/max.h
@@ -39,7 +39,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 const _Tp&
 max(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b)
 {
-    return std::max(__a, __b, __less<>());
+  return std::max(__a, __b, __less<>());
 }
 
 #ifndef _LIBCPP_CXX03_LANG
@@ -50,7 +50,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 _Tp
 max(initializer_list<_Tp> __t, _Compare __comp)
 {
-    return *std::__max_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
+  return *std::__max_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
 }
 
 template<class _Tp>
@@ -59,7 +59,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 _Tp
 max(initializer_list<_Tp> __t)
 {
-    return *std::max_element(__t.begin(), __t.end(), __less<>());
+  return *std::max_element(__t.begin(), __t.end(), __less<>());
 }
 
 #endif // _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/__algorithm/max_element.h b/libcxx/include/__algorithm/max_element.h
index a2dc9707c0..963b91cd3d 100644
--- a/libcxx/include/__algorithm/max_element.h
+++ b/libcxx/include/__algorithm/max_element.h
@@ -40,7 +40,7 @@ template <class _ForwardIterator, class _Compare>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
 max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
-    return std::__max_element<__comp_ref_type<_Compare> >(__first, __last, __comp);
+  return std::__max_element<__comp_ref_type<_Compare> >(__first, __last, __comp);
 }
 
 
@@ -48,7 +48,7 @@ template <class _ForwardIterator>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
 max_element(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return std::max_element(__first, __last, __less<>());
+  return std::max_element(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/merge.h b/libcxx/include/__algorithm/merge.h
index 8a6021f188..44ecb1372e 100644
--- a/libcxx/include/__algorithm/merge.h
+++ b/libcxx/include/__algorithm/merge.h
@@ -30,7 +30,7 @@ __merge(_InputIterator1 __first1, _InputIterator1 __last1,
     for (; __first1 != __last1; ++__result)
     {
         if (__first2 == __last2)
-            return std::copy(__first1, __last1, __result);
+          return std::copy(__first1, __last1, __result);
         if (__comp(*__first2, *__first1))
         {
             *__result = *__first2;
@@ -51,7 +51,7 @@ _OutputIterator
 merge(_InputIterator1 __first1, _InputIterator1 __last1,
       _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
 {
-    return std::__merge<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __comp);
+  return std::__merge<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __comp);
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
@@ -60,7 +60,7 @@ _OutputIterator
 merge(_InputIterator1 __first1, _InputIterator1 __last1,
       _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result)
 {
-    return std::merge(__first1, __last1, __first2, __last2, __result, __less<>());
+  return std::merge(__first1, __last1, __first2, __last2, __result, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/min.h b/libcxx/include/__algorithm/min.h
index 5857451713..eda8986f7b 100644
--- a/libcxx/include/__algorithm/min.h
+++ b/libcxx/include/__algorithm/min.h
@@ -39,7 +39,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 const _Tp&
 min(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b)
 {
-    return std::min(__a, __b, __less<>());
+  return std::min(__a, __b, __less<>());
 }
 
 #ifndef _LIBCPP_CXX03_LANG
@@ -50,7 +50,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 _Tp
 min(initializer_list<_Tp> __t, _Compare __comp)
 {
-    return *std::__min_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
+  return *std::__min_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
 }
 
 template<class _Tp>
@@ -59,7 +59,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 _Tp
 min(initializer_list<_Tp> __t)
 {
-    return *std::min_element(__t.begin(), __t.end(), __less<>());
+  return *std::min_element(__t.begin(), __t.end(), __less<>());
 }
 
 #endif // _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/__algorithm/min_element.h b/libcxx/include/__algorithm/min_element.h
index 0ce7af6933..f0806e91de 100644
--- a/libcxx/include/__algorithm/min_element.h
+++ b/libcxx/include/__algorithm/min_element.h
@@ -64,7 +64,7 @@ template <class _ForwardIterator>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
 min_element(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return std::min_element(__first, __last, __less<>());
+  return std::min_element(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/next_permutation.h b/libcxx/include/__algorithm/next_permutation.h
index ebaed15ae2..b3933da232 100644
--- a/libcxx/include/__algorithm/next_permutation.h
+++ b/libcxx/include/__algorithm/next_permutation.h
@@ -69,7 +69,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 bool
 next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
 {
-    return std::next_permutation(__first, __last, __less<>());
+  return std::next_permutation(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/nth_element.h b/libcxx/include/__algorithm/nth_element.h
index 6b3b2bb434..f3f6213a86 100644
--- a/libcxx/include/__algorithm/nth_element.h
+++ b/libcxx/include/__algorithm/nth_element.h
@@ -93,58 +93,58 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
         {
             // *__first == *__m, *__first doesn't go in first part
             if (std::__nth_element_find_guard<_Compare>(__i, __j, __m, __comp)) {
-                _Ops::iter_swap(__i, __j);
-                ++__n_swaps;
+              _Ops::iter_swap(__i, __j);
+              ++__n_swaps;
             } else {
-                // *__first == *__m, *__m <= all other elements
-                // Partition instead into [__first, __i) == *__first and *__first < [__i, __last)
-                ++__i;  // __first + 1
-                __j = __last;
-                if (!__comp(*__first, *--__j)) {  // we need a guard if *__first == *(__last-1)
-                    while (true) {
-                        if (__i == __j) {
-                            return;  // [__first, __last) all equivalent elements
-                        } else if (__comp(*__first, *__i)) {
-                            _Ops::iter_swap(__i, __j);
-                            ++__n_swaps;
-                            ++__i;
-                            break;
-                        }
-                        ++__i;
-                    }
-                }
-                // [__first, __i) == *__first and *__first < [__j, __last) and __j == __last - 1
-                if (__i == __j) {
-                    return;
-                }
+              // *__first == *__m, *__m <= all other elements
+              // Partition instead into [__first, __i) == *__first and *__first < [__i, __last)
+              ++__i; // __first + 1
+              __j = __last;
+              if (!__comp(*__first, *--__j)) { // we need a guard if *__first == *(__last-1)
                 while (true) {
-                    while (!__comp(*__first, *__i)) {
-                        ++__i;
-                        _LIBCPP_ASSERT_UNCATEGORIZED(
-                            __i != __last,
-                            "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
-                    }
-                    do {
-                        _LIBCPP_ASSERT_UNCATEGORIZED(
-                            __j != __first,
-                            "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
-                        --__j;
-                    } while (__comp(*__first, *__j));
-                    if (__i >= __j)
-                        break;
+                  if (__i == __j) {
+                    return; // [__first, __last) all equivalent elements
+                  } else if (__comp(*__first, *__i)) {
                     _Ops::iter_swap(__i, __j);
                     ++__n_swaps;
                     ++__i;
+                    break;
+                  }
+                  ++__i;
                 }
-                // [__first, __i) == *__first and *__first < [__i, __last)
-                // The first part is sorted,
-                if (__nth < __i) {
-                    return;
+              }
+              // [__first, __i) == *__first and *__first < [__j, __last) and __j == __last - 1
+              if (__i == __j) {
+                return;
+              }
+              while (true) {
+                while (!__comp(*__first, *__i)) {
+                  ++__i;
+                  _LIBCPP_ASSERT_UNCATEGORIZED(
+                      __i != __last,
+                      "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
                 }
-                // __nth_element the second part
-                // std::__nth_element<_Compare>(__i, __nth, __last, __comp);
-                __first = __i;
-                continue;
+                do {
+                  _LIBCPP_ASSERT_UNCATEGORIZED(
+                      __j != __first,
+                      "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
+                  --__j;
+                } while (__comp(*__first, *__j));
+                if (__i >= __j)
+                  break;
+                _Ops::iter_swap(__i, __j);
+                ++__n_swaps;
+                ++__i;
+              }
+              // [__first, __i) == *__first and *__first < [__i, __last)
+              // The first part is sorted,
+              if (__nth < __i) {
+                return;
+              }
+              // __nth_element the second part
+              // std::__nth_element<_Compare>(__i, __nth, __last, __comp);
+              __first = __i;
+              continue;
             }
         }
         ++__i;
@@ -228,13 +228,13 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
         // __nth_element on range containing __nth
         if (__nth < __i)
         {
-            // std::__nth_element<_Compare>(__first, __nth, __i, __comp);
-            __last = __i;
+          // std::__nth_element<_Compare>(__first, __nth, __i, __comp);
+          __last = __i;
         }
         else
         {
-            // std::__nth_element<_Compare>(__i+1, __nth, __last, __comp);
-            __first = ++__i;
+          // std::__nth_element<_Compare>(__i+1, __nth, __last, __comp);
+          __first = ++__i;
         }
     }
 }
diff --git a/libcxx/include/__algorithm/partial_sort.h b/libcxx/include/__algorithm/partial_sort.h
index de4ebfcbd8..7635078793 100644
--- a/libcxx/include/__algorithm/partial_sort.h
+++ b/libcxx/include/__algorithm/partial_sort.h
@@ -87,7 +87,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 void
 partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last)
 {
-    std::partial_sort(__first, __middle, __last, __less<>());
+  std::partial_sort(__first, __middle, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/partial_sort_copy.h b/libcxx/include/__algorithm/partial_sort_copy.h
index 2c1e786d03..27d5f93370 100644
--- a/libcxx/include/__algorithm/partial_sort_copy.h
+++ b/libcxx/include/__algorithm/partial_sort_copy.h
@@ -79,7 +79,7 @@ _RandomAccessIterator
 partial_sort_copy(_InputIterator __first, _InputIterator __last,
                   _RandomAccessIterator __result_first, _RandomAccessIterator __result_last)
 {
-    return std::partial_sort_copy(__first, __last, __result_first, __result_last, __less<>());
+  return std::partial_sort_copy(__first, __last, __result_first, __result_last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/partition_point.h b/libcxx/include/__algorithm/partition_point.h
index a61ed5ec5b..903d7b3688 100644
--- a/libcxx/include/__algorithm/partition_point.h
+++ b/libcxx/include/__algorithm/partition_point.h
@@ -29,13 +29,12 @@ partition_point(_ForwardIterator __first, _ForwardIterator __last, _Predicate __
     difference_type __len = std::distance(__first, __last);
     while (__len != 0)
     {
-        difference_type __l2 = std::__half_positive(__len);
-        _ForwardIterator __m = __first;
-        std::advance(__m, __l2);
-        if (__pred(*__m))
-        {
-            __first = ++__m;
-            __len -= __l2 + 1;
+      difference_type __l2 = std::__half_positive(__len);
+      _ForwardIterator __m = __first;
+      std::advance(__m, __l2);
+      if (__pred(*__m)) {
+        __first = ++__m;
+        __len -= __l2 + 1;
         }
         else
             __len = __l2;
diff --git a/libcxx/include/__algorithm/prev_permutation.h b/libcxx/include/__algorithm/prev_permutation.h
index 4a6bf4a664..20bd47767e 100644
--- a/libcxx/include/__algorithm/prev_permutation.h
+++ b/libcxx/include/__algorithm/prev_permutation.h
@@ -70,7 +70,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 bool
 prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
 {
-    return std::prev_permutation(__first, __last, __less<>());
+  return std::prev_permutation(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/remove.h b/libcxx/include/__algorithm/remove.h
index eff2275718..81aa1b4807 100644
--- a/libcxx/include/__algorithm/remove.h
+++ b/libcxx/include/__algorithm/remove.h
@@ -24,18 +24,15 @@ template <class _ForwardIterator, class _Tp>
 _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
 remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
 {
-    __first = std::find(__first, __last, __value);
-    if (__first != __last)
-    {
-        _ForwardIterator __i = __first;
-        while (++__i != __last)
-        {
-            if (!(*__i == __value))
-            {
-                *__first = std::move(*__i);
-                ++__first;
-            }
-        }
+  __first = std::find(__first, __last, __value);
+  if (__first != __last) {
+    _ForwardIterator __i = __first;
+    while (++__i != __last) {
+      if (!(*__i == __value)) {
+        *__first = std::move(*__i);
+        ++__first;
+      }
+    }
     }
     return __first;
 }
diff --git a/libcxx/include/__algorithm/remove_if.h b/libcxx/include/__algorithm/remove_if.h
index 8197e4fc2f..4943715a34 100644
--- a/libcxx/include/__algorithm/remove_if.h
+++ b/libcxx/include/__algorithm/remove_if.h
@@ -23,18 +23,15 @@ template <class _ForwardIterator, class _Predicate>
 _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
 remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
 {
-    __first = std::find_if<_ForwardIterator, _Predicate&>(__first, __last, __pred);
-    if (__first != __last)
-    {
-        _ForwardIterator __i = __first;
-        while (++__i != __last)
-        {
-            if (!__pred(*__i))
-            {
-                *__first = std::move(*__i);
-                ++__first;
-            }
-        }
+  __first = std::find_if<_ForwardIterator, _Predicate&>(__first, __last, __pred);
+  if (__first != __last) {
+    _ForwardIterator __i = __first;
+    while (++__i != __last) {
+      if (!__pred(*__i)) {
+        *__first = std::move(*__i);
+        ++__first;
+      }
+    }
     }
     return __first;
 }
diff --git a/libcxx/include/__algorithm/rotate.h b/libcxx/include/__algorithm/rotate.h
index f9236fcaaf..037a6688f6 100644
--- a/libcxx/include/__algorithm/rotate.h
+++ b/libcxx/include/__algorithm/rotate.h
@@ -49,7 +49,7 @@ __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last)
     _BidirectionalIterator __lm1 = _Ops::prev(__last);
     value_type __tmp = _Ops::__iter_move(__lm1);
     _BidirectionalIterator __fp1 = std::__move_backward<_AlgPolicy>(__first, __lm1, std::move(__last)).second;
-    *__first = std::move(__tmp);
+    *__first                     = std::move(__tmp);
     return __fp1;
 }
 
@@ -139,18 +139,14 @@ __rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran
 }
 
 template <class _AlgPolicy, class _ForwardIterator>
-inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
-__rotate_impl(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
-         std::forward_iterator_tag)
-{
-    typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
-    if (is_trivially_move_assignable<value_type>::value)
-    {
-        if (_IterOps<_AlgPolicy>::next(__first) == __middle)
-            return std::__rotate_left<_AlgPolicy>(__first, __last);
-    }
-    return std::__rotate_forward<_AlgPolicy>(__first, __middle, __last);
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
+__rotate_impl(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, std::forward_iterator_tag) {
+  typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
+  if (is_trivially_move_assignable<value_type>::value) {
+    if (_IterOps<_AlgPolicy>::next(__first) == __middle)
+      return std::__rotate_left<_AlgPolicy>(__first, __last);
+  }
+  return std::__rotate_forward<_AlgPolicy>(__first, __middle, __last);
 }
 
 template <class _AlgPolicy, class _BidirectionalIterator>
diff --git a/libcxx/include/__algorithm/rotate_copy.h b/libcxx/include/__algorithm/rotate_copy.h
index 6e886cb73c..43f69ba78b 100644
--- a/libcxx/include/__algorithm/rotate_copy.h
+++ b/libcxx/include/__algorithm/rotate_copy.h
@@ -23,7 +23,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 _OutputIterator
 rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result)
 {
-    return std::copy(__first, __middle, std::copy(__middle, __last, __result));
+  return std::copy(__first, __middle, std::copy(__middle, __last, __result));
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/shift_right.h b/libcxx/include/__algorithm/shift_right.h
index 70983e327b..84197aa924 100644
--- a/libcxx/include/__algorithm/shift_right.h
+++ b/libcxx/include/__algorithm/shift_right.h
@@ -69,8 +69,8 @@ shift_right(_ForwardIterator __first, _ForwardIterator __last,
         auto __lead = __ret;
         while (__trail != __ret) {
             if (__lead == __last) {
-                std::move(__first, __trail, __ret);
-                return __ret;
+              std::move(__first, __trail, __ret);
+              return __ret;
             }
             ++__trail;
             ++__lead;
@@ -79,9 +79,9 @@ shift_right(_ForwardIterator __first, _ForwardIterator __last,
         _ForwardIterator __mid = __first;
         while (true) {
             if (__lead == __last) {
-                __trail = std::move(__mid, __ret, __trail);
-                std::move(__first, __mid, __trail);
-                return __ret;
+              __trail = std::move(__mid, __ret, __trail);
+              std::move(__first, __mid, __trail);
+              return __ret;
             }
             swap(*__mid, *__trail);
             ++__mid;
diff --git a/libcxx/include/__algorithm/stable_partition.h b/libcxx/include/__algorithm/stable_partition.h
index 0e92a0a5f7..4d40b47c69 100644
--- a/libcxx/include/__algorithm/stable_partition.h
+++ b/libcxx/include/__algorithm/stable_partition.h
@@ -144,7 +144,7 @@ __stable_partition_impl(_ForwardIterator __first, _ForwardIterator __last, _Pred
     {
 // TODO: Remove the use of std::get_temporary_buffer
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
-        __p = std::get_temporary_buffer<value_type>(__len);
+__p = std::get_temporary_buffer<value_type>(__len);
 _LIBCPP_SUPPRESS_DEPRECATED_POP
         __h.reset(__p.first);
     }
@@ -298,7 +298,7 @@ __stable_partition_impl(_BidirectionalIterator __first, _BidirectionalIterator _
     {
 // TODO: Remove the use of std::get_temporary_buffer
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
-        __p = std::get_temporary_buffer<value_type>(__len);
+__p = std::get_temporary_buffer<value_type>(__len);
 _LIBCPP_SUPPRESS_DEPRECATED_POP
         __h.reset(__p.first);
     }
diff --git a/libcxx/include/__algorithm/stable_sort.h b/libcxx/include/__algorithm/stable_sort.h
index 175393fc47..043a6b81f9 100644
--- a/libcxx/include/__algorithm/stable_sort.h
+++ b/libcxx/include/__algorithm/stable_sort.h
@@ -230,11 +230,11 @@ __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp
         __d.__set(__len, (value_type*)nullptr);
         std::__merge_move_assign<_AlgPolicy, _Compare>(
             __buff, __buff + __l2, __buff + __l2, __buff + __len, __first, __comp);
-//         std::__merge<_Compare>(move_iterator<value_type*>(__buff),
-//                                  move_iterator<value_type*>(__buff + __l2),
-//                                  move_iterator<_RandomAccessIterator>(__buff + __l2),
-//                                  move_iterator<_RandomAccessIterator>(__buff + __len),
-//                                  __first, __comp);
+        //         std::__merge<_Compare>(move_iterator<value_type*>(__buff),
+        //                                  move_iterator<value_type*>(__buff + __l2),
+        //                                  move_iterator<_RandomAccessIterator>(__buff + __l2),
+        //                                  move_iterator<_RandomAccessIterator>(__buff + __len),
+        //                                  __first, __comp);
         return;
     }
     std::__stable_sort<_AlgPolicy, _Compare>(__first, __m, __comp, __l2, __buff, __buff_size);
diff --git a/libcxx/include/__compare/compare_partial_order_fallback.h b/libcxx/include/__compare/compare_partial_order_fallback.h
index a49408e1cf..40d6c5eb87 100644
--- a/libcxx/include/__compare/compare_partial_order_fallback.h
+++ b/libcxx/include/__compare/compare_partial_order_fallback.h
@@ -28,38 +28,40 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 // [cmp.alg]
 namespace __compare_partial_order_fallback {
     struct __fn {
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
-            noexcept(noexcept(std::partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
-            -> decltype(      std::partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))
-            { return          std::partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)); }
+      template <class _Tp, class _Up>
+        requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+      _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<1>) noexcept(
+          noexcept(std::partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
+          -> decltype(std::partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))) {
+        return std::partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u));
+      }
 
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
-            noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? partial_ordering::equivalent :
-                              std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? partial_ordering::less :
-                              std::forward<_Up>(__u) < std::forward<_Tp>(__t) ? partial_ordering::greater :
-                              partial_ordering::unordered))
-            -> decltype(      std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? partial_ordering::equivalent :
-                              std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? partial_ordering::less :
-                              std::forward<_Up>(__u) < std::forward<_Tp>(__t) ? partial_ordering::greater :
-                              partial_ordering::unordered)
-        {
-            return            std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? partial_ordering::equivalent :
-                              std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? partial_ordering::less :
-                              std::forward<_Up>(__u) < std::forward<_Tp>(__t) ? partial_ordering::greater :
-                              partial_ordering::unordered;
-        }
+      template <class _Tp, class _Up>
+        requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+      _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<0>) noexcept(noexcept(
+          std::forward<_Tp>(__t) == std::forward<_Up>(__u)  ? partial_ordering::equivalent
+          : std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? partial_ordering::less
+          : std::forward<_Up>(__u) < std::forward<_Tp>(__t)
+              ? partial_ordering::greater
+              : partial_ordering::unordered))
+          -> decltype(std::forward<_Tp>(__t) == std::forward<_Up>(__u)  ? partial_ordering::equivalent
+                      : std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? partial_ordering::less
+                      : std::forward<_Up>(__u) < std::forward<_Tp>(__t)
+                          ? partial_ordering::greater
+                          : partial_ordering::unordered) {
+        return std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? partial_ordering::equivalent
+             : std::forward<_Tp>(__t) < std::forward<_Up>(__u)  ? partial_ordering::less
+             : std::forward<_Up>(__u) < std::forward<_Tp>(__t)
+                 ? partial_ordering::greater
+                 : partial_ordering::unordered;
+      }
 
-        template<class _Tp, class _Up>
-        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
-            noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>())))
-            -> decltype(      __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>()))
-            { return          __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>()); }
+      template <class _Tp, class _Up>
+      _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
+          noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>())))
+              -> decltype(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>())) {
+        return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>());
+      }
     };
 } // namespace __compare_partial_order_fallback
 
diff --git a/libcxx/include/__compare/compare_strong_order_fallback.h b/libcxx/include/__compare/compare_strong_order_fallback.h
index 9e2dfee6b3..7f9607f85a 100644
--- a/libcxx/include/__compare/compare_strong_order_fallback.h
+++ b/libcxx/include/__compare/compare_strong_order_fallback.h
@@ -28,35 +28,37 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 // [cmp.alg]
 namespace __compare_strong_order_fallback {
     struct __fn {
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
-            noexcept(noexcept(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
-            -> decltype(      std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))
-            { return          std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)); }
+      template <class _Tp, class _Up>
+        requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+      _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<1>) noexcept(
+          noexcept(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
+          -> decltype(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))) {
+        return std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u));
+      }
 
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
-            noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? strong_ordering::equal :
-                              std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? strong_ordering::less :
-                              strong_ordering::greater))
-            -> decltype(      std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? strong_ordering::equal :
-                              std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? strong_ordering::less :
-                              strong_ordering::greater)
-        {
-            return            std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? strong_ordering::equal :
-                              std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? strong_ordering::less :
-                              strong_ordering::greater;
-        }
+      template <class _Tp, class _Up>
+        requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+      _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<0>) noexcept(noexcept(
+          std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? strong_ordering::equal
+          : std::forward<_Tp>(__t) < std::forward<_Up>(__u)
+              ? strong_ordering::less
+              : strong_ordering::greater))
+          -> decltype(std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? strong_ordering::equal
+                      : std::forward<_Tp>(__t) < std::forward<_Up>(__u)
+                          ? strong_ordering::less
+                          : strong_ordering::greater) {
+        return std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? strong_ordering::equal
+             : std::forward<_Tp>(__t) < std::forward<_Up>(__u)
+                 ? strong_ordering::less
+                 : strong_ordering::greater;
+      }
 
-        template<class _Tp, class _Up>
-        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
-            noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>())))
-            -> decltype(      __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>()))
-            { return          __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>()); }
+      template <class _Tp, class _Up>
+      _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
+          noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>())))
+              -> decltype(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>())) {
+        return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>());
+      }
     };
 } // namespace __compare_strong_order_fallback
 
diff --git a/libcxx/include/__compare/compare_three_way.h b/libcxx/include/__compare/compare_three_way.h
index b1ed2d1e72..039b39ff89 100644
--- a/libcxx/include/__compare/compare_three_way.h
+++ b/libcxx/include/__compare/compare_three_way.h
@@ -24,12 +24,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 struct _LIBCPP_TEMPLATE_VIS compare_three_way
 {
-    template<class _T1, class _T2>
-        requires three_way_comparable_with<_T1, _T2>
-    constexpr _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) <=> std::forward<_T2>(__u)))
-        { return          std::forward<_T1>(__t) <=> std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+    requires three_way_comparable_with<_T1, _T2>
+  constexpr _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) <=> std::forward<_T2>(__u))) {
+    return std::forward<_T1>(__t) <=> std::forward<_T2>(__u);
+  }
 
     using is_transparent = void;
 };
diff --git a/libcxx/include/__compare/compare_weak_order_fallback.h b/libcxx/include/__compare/compare_weak_order_fallback.h
index b0a04abcaa..4d942beebb 100644
--- a/libcxx/include/__compare/compare_weak_order_fallback.h
+++ b/libcxx/include/__compare/compare_weak_order_fallback.h
@@ -28,35 +28,37 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 // [cmp.alg]
 namespace __compare_weak_order_fallback {
     struct __fn {
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
-            noexcept(noexcept(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
-            -> decltype(      std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))
-            { return          std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)); }
+      template <class _Tp, class _Up>
+        requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+      _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<1>) noexcept(
+          noexcept(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
+          -> decltype(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))) {
+        return std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u));
+      }
 
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
-            noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? weak_ordering::equivalent :
-                              std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? weak_ordering::less :
-                              weak_ordering::greater))
-            -> decltype(      std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? weak_ordering::equivalent :
-                              std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? weak_ordering::less :
-                              weak_ordering::greater)
-        {
-            return            std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? weak_ordering::equivalent :
-                              std::forward<_Tp>(__t) < std::forward<_Up>(__u) ? weak_ordering::less :
-                              weak_ordering::greater;
-        }
+      template <class _Tp, class _Up>
+        requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+      _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<0>) noexcept(noexcept(
+          std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? weak_ordering::equivalent
+          : std::forward<_Tp>(__t) < std::forward<_Up>(__u)
+              ? weak_ordering::less
+              : weak_ordering::greater))
+          -> decltype(std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? weak_ordering::equivalent
+                      : std::forward<_Tp>(__t) < std::forward<_Up>(__u)
+                          ? weak_ordering::less
+                          : weak_ordering::greater) {
+        return std::forward<_Tp>(__t) == std::forward<_Up>(__u) ? weak_ordering::equivalent
+             : std::forward<_Tp>(__t) < std::forward<_Up>(__u)
+                 ? weak_ordering::less
+                 : weak_ordering::greater;
+      }
 
-        template<class _Tp, class _Up>
-        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
-            noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>())))
-            -> decltype(      __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>()))
-            { return          __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>()); }
+      template <class _Tp, class _Up>
+      _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
+          noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>())))
+              -> decltype(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>())) {
+        return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<1>());
+      }
     };
 } // namespace __compare_weak_order_fallback
 
diff --git a/libcxx/include/__compare/partial_order.h b/libcxx/include/__compare/partial_order.h
index 36a11dfaa2..9da4b4887d 100644
--- a/libcxx/include/__compare/partial_order.h
+++ b/libcxx/include/__compare/partial_order.h
@@ -30,36 +30,37 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 namespace __partial_order {
     struct __fn {
     // NOLINTBEGIN(libcpp-robust-against-adl) partial_order should use ADL, but only here
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<2>)
-            noexcept(noexcept(partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
-            -> decltype(      partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
-            { return          partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
+    template <class _Tp, class _Up>
+      requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+    _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<2>) noexcept(
+        noexcept(partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
+        -> decltype(partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) {
+      return partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)));
+    }
     // NOLINTEND(libcpp-robust-against-adl)
 
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
-            noexcept(noexcept(partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
-            -> decltype(      partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
-            { return          partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
+    template <class _Tp, class _Up>
+      requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+    _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<1>) noexcept(
+        noexcept(partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
+        -> decltype(partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) {
+      return partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)));
+    }
 
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
-            noexcept(noexcept(partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
-            -> decltype(      partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
-            { return          partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
+    template <class _Tp, class _Up>
+      requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+    _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<0>) noexcept(
+        noexcept(partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
+        -> decltype(partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) {
+      return partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)));
+    }
 
-        template<class _Tp, class _Up>
-        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
-            noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>())))
-            -> decltype(      __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>()))
-            { return          __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>()); }
+    template <class _Tp, class _Up>
+    _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
+        noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>())))
+            -> decltype(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>())) {
+      return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>());
+    }
     };
 } // namespace __partial_order
 
diff --git a/libcxx/include/__compare/strong_order.h b/libcxx/include/__compare/strong_order.h
index cbfcf7316d..20c4f36988 100644
--- a/libcxx/include/__compare/strong_order.h
+++ b/libcxx/include/__compare/strong_order.h
@@ -36,13 +36,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 namespace __strong_order {
     struct __fn {
     // NOLINTBEGIN(libcpp-robust-against-adl) strong_order should use ADL, but only here
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<2>)
-            noexcept(noexcept(strong_ordering(strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
-            -> decltype(      strong_ordering(strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
-            { return          strong_ordering(strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
+    template <class _Tp, class _Up>
+      requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+    _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<2>) noexcept(
+        noexcept(strong_ordering(strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
+        -> decltype(strong_ordering(strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) {
+      return strong_ordering(strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)));
+    }
     // NOLINTEND(libcpp-robust-against-adl)
 
         template<class _Tp, class _Up, class _Dp = decay_t<_Tp>>
@@ -51,42 +51,42 @@ namespace __strong_order {
         __go(_Tp&& __t, _Up&& __u, __priority_tag<1>) noexcept
         {
             if constexpr (numeric_limits<_Dp>::is_iec559 && sizeof(_Dp) == sizeof(int32_t)) {
-                int32_t __rx = std::bit_cast<int32_t>(__t);
-                int32_t __ry = std::bit_cast<int32_t>(__u);
-                __rx = (__rx < 0) ? (numeric_limits<int32_t>::min() - __rx - 1) : __rx;
-                __ry = (__ry < 0) ? (numeric_limits<int32_t>::min() - __ry - 1) : __ry;
-                return (__rx <=> __ry);
+              int32_t __rx = std::bit_cast<int32_t>(__t);
+              int32_t __ry = std::bit_cast<int32_t>(__u);
+              __rx         = (__rx < 0) ? (numeric_limits<int32_t>::min() - __rx - 1) : __rx;
+              __ry         = (__ry < 0) ? (numeric_limits<int32_t>::min() - __ry - 1) : __ry;
+              return (__rx <=> __ry);
             } else if constexpr (numeric_limits<_Dp>::is_iec559 && sizeof(_Dp) == sizeof(int64_t)) {
-                int64_t __rx = std::bit_cast<int64_t>(__t);
-                int64_t __ry = std::bit_cast<int64_t>(__u);
-                __rx = (__rx < 0) ? (numeric_limits<int64_t>::min() - __rx - 1) : __rx;
-                __ry = (__ry < 0) ? (numeric_limits<int64_t>::min() - __ry - 1) : __ry;
-                return (__rx <=> __ry);
+              int64_t __rx = std::bit_cast<int64_t>(__t);
+              int64_t __ry = std::bit_cast<int64_t>(__u);
+              __rx         = (__rx < 0) ? (numeric_limits<int64_t>::min() - __rx - 1) : __rx;
+              __ry         = (__ry < 0) ? (numeric_limits<int64_t>::min() - __ry - 1) : __ry;
+              return (__rx <=> __ry);
             } else if (__t < __u) {
                 return strong_ordering::less;
             } else if (__t > __u) {
                 return strong_ordering::greater;
             } else if (__t == __u) {
                 if constexpr (numeric_limits<_Dp>::radix == 2) {
-                    return std::signbit(__u) <=> std::signbit(__t);
+                  return std::signbit(__u) <=> std::signbit(__t);
                 } else {
                     // This is bullet 3 of the IEEE754 algorithm, relevant
                     // only for decimal floating-point;
                     // see https://stackoverflow.com/questions/69068075/
                     if (__t == 0 || std::isinf(__t)) {
-                        return std::signbit(__u) <=> std::signbit(__t);
+                      return std::signbit(__u) <=> std::signbit(__t);
                     } else {
-                        int __texp, __uexp;
-                        (void)std::frexp(__t, &__texp);
-                        (void)std::frexp(__u, &__uexp);
-                        return (__t < 0) ? (__texp <=> __uexp) : (__uexp <=> __texp);
+                      int __texp, __uexp;
+                      (void)std::frexp(__t, &__texp);
+                      (void)std::frexp(__u, &__uexp);
+                      return (__t < 0) ? (__texp <=> __uexp) : (__uexp <=> __texp);
                     }
                 }
             } else {
                 // They're unordered, so one of them must be a NAN.
                 // The order is -QNAN, -SNAN, numbers, +SNAN, +QNAN.
-                bool __t_is_nan = std::isnan(__t);
-                bool __u_is_nan = std::isnan(__u);
+                bool __t_is_nan      = std::isnan(__t);
+                bool __u_is_nan      = std::isnan(__u);
                 bool __t_is_negative = std::signbit(__t);
                 bool __u_is_negative = std::signbit(__u);
                 using _IntType = conditional_t<
@@ -100,7 +100,7 @@ namespace __strong_order {
                     if (__t_is_negative != __u_is_negative) {
                         return (__u_is_negative <=> __t_is_negative);
                     } else {
-                        return std::bit_cast<_IntType>(__t) <=> std::bit_cast<_IntType>(__u);
+                      return std::bit_cast<_IntType>(__t) <=> std::bit_cast<_IntType>(__u);
                     }
                 } else if (__t_is_nan) {
                     return __t_is_negative ? strong_ordering::less : strong_ordering::greater;
@@ -110,19 +110,20 @@ namespace __strong_order {
             }
         }
 
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
-            noexcept(noexcept(strong_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
-            -> decltype(      strong_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
-            { return          strong_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
+        template <class _Tp, class _Up>
+          requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+        _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<0>) noexcept(
+            noexcept(strong_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
+            -> decltype(strong_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) {
+          return strong_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)));
+        }
 
-        template<class _Tp, class _Up>
+        template <class _Tp, class _Up>
         _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
             noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>())))
-            -> decltype(      __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>()))
-            { return          __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>()); }
+                -> decltype(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>())) {
+          return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>());
+        }
     };
 } // namespace __strong_order
 
diff --git a/libcxx/include/__compare/weak_order.h b/libcxx/include/__compare/weak_order.h
index e6a42ac4c9..6a97b62992 100644
--- a/libcxx/include/__compare/weak_order.h
+++ b/libcxx/include/__compare/weak_order.h
@@ -30,13 +30,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 namespace __weak_order {
     struct __fn {
     // NOLINTBEGIN(libcpp-robust-against-adl) weak_order should use ADL, but only here
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<3>)
-            noexcept(noexcept(weak_ordering(weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
-            -> decltype(      weak_ordering(weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
-            { return          weak_ordering(weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
+    template <class _Tp, class _Up>
+      requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+    _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<3>) noexcept(
+        noexcept(weak_ordering(weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
+        -> decltype(weak_ordering(weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) {
+      return weak_ordering(weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)));
+    }
     // NOLINTEND(libcpp-robust-against-adl)
 
         template<class _Tp, class _Up, class _Dp = decay_t<_Tp>>
@@ -53,8 +53,8 @@ namespace __weak_order {
                 return weak_ordering::greater;
             } else {
                 // Otherwise, at least one of them is a NaN.
-                bool __t_is_nan = std::isnan(__t);
-                bool __u_is_nan = std::isnan(__u);
+                bool __t_is_nan      = std::isnan(__t);
+                bool __u_is_nan      = std::isnan(__u);
                 bool __t_is_negative = std::signbit(__t);
                 bool __u_is_negative = std::signbit(__u);
                 if (__t_is_nan && __u_is_nan) {
@@ -67,27 +67,28 @@ namespace __weak_order {
             }
         }
 
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
-            noexcept(noexcept(weak_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
-            -> decltype(      weak_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
-            { return          weak_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
+        template <class _Tp, class _Up>
+          requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+        _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<1>) noexcept(
+            noexcept(weak_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
+            -> decltype(weak_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) {
+          return weak_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)));
+        }
 
-        template<class _Tp, class _Up>
-            requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
-        __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
-            noexcept(noexcept(weak_ordering(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
-            -> decltype(      weak_ordering(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))
-            { return          weak_ordering(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); }
+        template <class _Tp, class _Up>
+          requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
+        _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<0>) noexcept(
+            noexcept(weak_ordering(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))))
+            -> decltype(weak_ordering(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) {
+          return weak_ordering(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)));
+        }
 
-        template<class _Tp, class _Up>
+        template <class _Tp, class _Up>
         _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
             noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<3>())))
-            -> decltype(      __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<3>()))
-            { return          __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<3>()); }
+                -> decltype(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<3>())) {
+          return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<3>());
+        }
     };
 } // namespace __weak_order
 
diff --git a/libcxx/include/__filesystem/directory_entry.h b/libcxx/include/__filesystem/directory_entry.h
index fe3cace853..c737d4b1f7 100644
--- a/libcxx/include/__filesystem/directory_entry.h
+++ b/libcxx/include/__filesystem/directory_entry.h
@@ -316,7 +316,7 @@ private:
 
   _LIBCPP_HIDE_FROM_ABI
   void __assign_iter_entry(_Path&& __p, __cached_data __dt) {
-    __p_ = std::move(__p);
+    __p_    = std::move(__p);
     __data_ = __dt;
   }
 
@@ -501,16 +501,13 @@ private:
 
 class __dir_element_proxy {
 public:
-  inline _LIBCPP_HIDE_FROM_ABI directory_entry operator*() {
-    return std::move(__elem_);
-  }
+  inline _LIBCPP_HIDE_FROM_ABI directory_entry operator*() { return std::move(__elem_); }
 
 private:
   friend class directory_iterator;
   friend class recursive_directory_iterator;
   _LIBCPP_HIDE_FROM_ABI explicit __dir_element_proxy(directory_entry const& __e) : __elem_(__e) {}
-  _LIBCPP_HIDE_FROM_ABI __dir_element_proxy(__dir_element_proxy&& __o)
-      : __elem_(std::move(__o.__elem_)) {}
+  _LIBCPP_HIDE_FROM_ABI __dir_element_proxy(__dir_element_proxy&& __o) : __elem_(std::move(__o.__elem_)) {}
   directory_entry __elem_;
 };
 
diff --git a/libcxx/include/__filesystem/directory_iterator.h b/libcxx/include/__filesystem/directory_iterator.h
index a2a48e5933..256ef13f24 100644
--- a/libcxx/include/__filesystem/directory_iterator.h
+++ b/libcxx/include/__filesystem/directory_iterator.h
@@ -155,14 +155,14 @@ _LIBCPP_END_NAMESPACE_FILESYSTEM
 #if _LIBCPP_STD_VER >= 20
 
 template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
-inline constexpr bool std::ranges::enable_borrowed_range<std::filesystem::directory_iterator> = true;
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY inline constexpr bool
+    std::ranges::enable_borrowed_range<std::filesystem::directory_iterator> = true;
 
 template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
-inline constexpr bool std::ranges::enable_view<std::filesystem::directory_iterator> = true;
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY inline constexpr bool
+    std::ranges::enable_view<std::filesystem::directory_iterator> = true;
 
-#endif // _LIBCPP_STD_VER >= 20
+#  endif // _LIBCPP_STD_VER >= 20
 
 #endif // _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
 
diff --git a/libcxx/include/__filesystem/path.h b/libcxx/include/__filesystem/path.h
index 466fa25a38..5ba448505d 100644
--- a/libcxx/include/__filesystem/path.h
+++ b/libcxx/include/__filesystem/path.h
@@ -468,12 +468,9 @@ public:
   // constructors and destructor
   _LIBCPP_HIDE_FROM_ABI path() noexcept {}
   _LIBCPP_HIDE_FROM_ABI path(const path& __p) : __pn_(__p.__pn_) {}
-  _LIBCPP_HIDE_FROM_ABI path(path&& __p) noexcept
-      : __pn_(std::move(__p.__pn_)) {}
+  _LIBCPP_HIDE_FROM_ABI path(path&& __p) noexcept : __pn_(std::move(__p.__pn_)) {}
 
-  _LIBCPP_HIDE_FROM_ABI
-  path(string_type&& __s, format = format::auto_format) noexcept
-      : __pn_(std::move(__s)) {}
+  _LIBCPP_HIDE_FROM_ABI path(string_type&& __s, format = format::auto_format) noexcept : __pn_(std::move(__s)) {}
 
   template <class _Source, class = _EnableIfPathable<_Source, void> >
   _LIBCPP_HIDE_FROM_ABI
@@ -780,15 +777,14 @@ public:
 #if defined(_LIBCPP_WIN32API)
   _LIBCPP_HIDE_FROM_ABI std::wstring wstring() const { return __pn_; }
 
-  _LIBCPP_HIDE_FROM_ABI
-  std::wstring generic_wstring() const {
+  _LIBCPP_HIDE_FROM_ABI std::wstring generic_wstring() const {
     std::wstring __s;
     __s.resize(__pn_.size());
     std::replace_copy(__pn_.begin(), __pn_.end(), __s.begin(), '\\', '/');
     return __s;
   }
 
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#    if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
   template <class _ECharT, class _Traits = char_traits<_ECharT>,
             class _Allocator = allocator<_ECharT> >
   _LIBCPP_HIDE_FROM_ABI
@@ -801,9 +797,7 @@ public:
     return __s;
   }
 
-  _LIBCPP_HIDE_FROM_ABI std::string string() const {
-    return string<char>();
-  }
+  _LIBCPP_HIDE_FROM_ABI std::string string() const { return string<char>(); }
   _LIBCPP_HIDE_FROM_ABI __u8_string u8string() const {
     using _CVT = __narrow_to_utf8<sizeof(wchar_t) * __CHAR_BIT__>;
     __u8_string __s;
@@ -812,12 +806,8 @@ public:
     return __s;
   }
 
-  _LIBCPP_HIDE_FROM_ABI std::u16string u16string() const {
-    return string<char16_t>();
-  }
-  _LIBCPP_HIDE_FROM_ABI std::u32string u32string() const {
-    return string<char32_t>();
-  }
+  _LIBCPP_HIDE_FROM_ABI std::u16string u16string() const { return string<char16_t>(); }
+  _LIBCPP_HIDE_FROM_ABI std::u32string u32string() const { return string<char32_t>(); }
 
   // generic format observers
   template <class _ECharT, class _Traits = char_traits<_ECharT>,
@@ -830,8 +820,7 @@ public:
     // Note: This (and generic_u8string below) is slightly suboptimal as
     // it iterates twice over the string; once to convert it to the right
     // character type, and once to replace path delimiters.
-    std::replace(__s.begin(), __s.end(),
-                   static_cast<_ECharT>('\\'), static_cast<_ECharT>('/'));
+    std::replace(__s.begin(), __s.end(), static_cast<_ECharT>('\\'), static_cast<_ECharT>('/'));
     return __s;
   }
 
@@ -869,16 +858,10 @@ public:
   }
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-  _LIBCPP_HIDE_FROM_ABI std::wstring wstring() const {
-    return string<wchar_t>();
-  }
+  _LIBCPP_HIDE_FROM_ABI std::wstring wstring() const { return string<wchar_t>(); }
 #endif
-  _LIBCPP_HIDE_FROM_ABI std::u16string u16string() const {
-    return string<char16_t>();
-  }
-  _LIBCPP_HIDE_FROM_ABI std::u32string u32string() const {
-    return string<char32_t>();
-  }
+  _LIBCPP_HIDE_FROM_ABI std::u16string u16string() const { return string<char16_t>(); }
+  _LIBCPP_HIDE_FROM_ABI std::u32string u32string() const { return string<char32_t>(); }
 #endif /* !_LIBCPP_HAS_NO_LOCALIZATION */
 
   // generic format observers
diff --git a/libcxx/include/__filesystem/recursive_directory_iterator.h b/libcxx/include/__filesystem/recursive_directory_iterator.h
index e0aac636db..86e112cb58 100644
--- a/libcxx/include/__filesystem/recursive_directory_iterator.h
+++ b/libcxx/include/__filesystem/recursive_directory_iterator.h
@@ -169,14 +169,14 @@ _LIBCPP_END_NAMESPACE_FILESYSTEM
 #if _LIBCPP_STD_VER >= 20
 
 template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
-inline constexpr bool std::ranges::enable_borrowed_range<std::filesystem::recursive_directory_iterator> = true;
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY inline constexpr bool
+    std::ranges::enable_borrowed_range<std::filesystem::recursive_directory_iterator> = true;
 
 template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
-inline constexpr bool std::ranges::enable_view<std::filesystem::recursive_directory_iterator> = true;
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY inline constexpr bool
+    std::ranges::enable_view<std::filesystem::recursive_directory_iterator> = true;
 
-#endif // _LIBCPP_STD_VER >= 20
+#  endif // _LIBCPP_STD_VER >= 20
 
 #endif // _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
 
diff --git a/libcxx/include/__filesystem/u8path.h b/libcxx/include/__filesystem/u8path.h
index a79007e969..0b3d076505 100644
--- a/libcxx/include/__filesystem/u8path.h
+++ b/libcxx/include/__filesystem/u8path.h
@@ -93,9 +93,9 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_WITH_CHAR8_T
 #if defined(_LIBCPP_WIN32API)
   using _Traits = __is_pathable<_Source>;
   return u8path(std::__unwrap_iter(_Traits::__range_begin(__s)), std::__unwrap_iter(_Traits::__range_end(__s)));
-#else
+#  else
   return path(__s);
-#endif
+#  endif
 }
 
 _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
diff --git a/libcxx/include/__format/buffer.h b/libcxx/include/__format/buffer.h
index 8aa58d6464..b64bf1596b 100644
--- a/libcxx/include/__format/buffer.h
+++ b/libcxx/include/__format/buffer.h
@@ -281,8 +281,7 @@ private:
 template <class _OutIt, __fmt_char_type _CharT>
 class _LIBCPP_TEMPLATE_VIS __writer_iterator {
 public:
-  _LIBCPP_HIDE_FROM_ABI explicit __writer_iterator(_OutIt __out_it)
-      : __out_it_{std::move(__out_it)} {}
+  _LIBCPP_HIDE_FROM_ABI explicit __writer_iterator(_OutIt __out_it) : __out_it_{std::move(__out_it)} {}
 
   _LIBCPP_HIDE_FROM_ABI _OutIt __out_it() && { return std::move(__out_it_); }
 
@@ -361,10 +360,9 @@ public:
     requires(same_as<_Storage, __internal_storage<_CharT>>)
       : __output_(__storage_.__begin(), __storage_.__buffer_size, this), __writer_(std::move(__out_it)) {}
 
-  _LIBCPP_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it) requires(
-      same_as<_Storage, __direct_storage<_CharT>>)
-      : __output_(std::__unwrap_iter(__out_it), size_t(-1), this),
-        __writer_(std::move(__out_it)) {}
+  _LIBCPP_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it)
+    requires(same_as<_Storage, __direct_storage<_CharT>>)
+      : __output_(std::__unwrap_iter(__out_it), size_t(-1), this), __writer_(std::move(__out_it)) {}
 
   _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return __output_.__make_output_iterator(); }
 
diff --git a/libcxx/include/__format/format_arg.h b/libcxx/include/__format/format_arg.h
index cc6be7a256..374ad817db 100644
--- a/libcxx/include/__format/format_arg.h
+++ b/libcxx/include/__format/format_arg.h
@@ -138,8 +138,8 @@ __visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
   case __format::__arg_t::__ptr:
     return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__ptr_);
   case __format::__arg_t::__handle:
-    return std::invoke(std::forward<_Visitor>(__vis),
-                         typename basic_format_arg<_Context>::handle{__arg.__value_.__handle_});
+    return std::invoke(
+        std::forward<_Visitor>(__vis), typename basic_format_arg<_Context>::handle{__arg.__value_.__handle_});
   }
 
   __libcpp_unreachable();
diff --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h
index 4e3d15ec86..b30ca8e8f1 100644
--- a/libcxx/include/__format/format_context.h
+++ b/libcxx/include/__format/format_context.h
@@ -51,13 +51,12 @@ class _LIBCPP_TEMPLATE_VIS basic_format_context;
  */
 template <class _OutIt, class _CharT>
 _LIBCPP_HIDE_FROM_ABI basic_format_context<_OutIt, _CharT>
-__format_context_create(
-    _OutIt __out_it,
-    basic_format_args<basic_format_context<_OutIt, _CharT>> __args,
-    optional<std::locale>&& __loc = nullopt) {
+__format_context_create(_OutIt __out_it,
+                        basic_format_args<basic_format_context<_OutIt, _CharT>> __args,
+                        optional<std::locale>&& __loc = nullopt) {
   return std::basic_format_context(std::move(__out_it), __args, std::move(__loc));
 }
-#else
+#  else
 template <class _OutIt, class _CharT>
 _LIBCPP_HIDE_FROM_ABI basic_format_context<_OutIt, _CharT>
 __format_context_create(
@@ -65,7 +64,7 @@ __format_context_create(
     basic_format_args<basic_format_context<_OutIt, _CharT>> __args) {
   return std::basic_format_context(std::move(__out_it), __args);
 }
-#endif
+#  endif
 
 using format_context =
     basic_format_context<back_insert_iterator<__format::__output_buffer<char>>,
@@ -121,27 +120,21 @@ private:
   optional<std::locale> __loc_;
 
   template <class _OtherOutIt, class _OtherCharT>
-  friend _LIBCPP_HIDE_FROM_ABI basic_format_context<_OtherOutIt, _OtherCharT>
-  __format_context_create(_OtherOutIt, basic_format_args<basic_format_context<_OtherOutIt, _OtherCharT>>,
-                          optional<std::locale>&&);
+  friend _LIBCPP_HIDE_FROM_ABI basic_format_context<_OtherOutIt, _OtherCharT> __format_context_create(
+      _OtherOutIt, basic_format_args<basic_format_context<_OtherOutIt, _OtherCharT>>, optional<std::locale>&&);
 
   // Note: the Standard doesn't specify the required constructors.
-  _LIBCPP_HIDE_FROM_ABI
-  explicit basic_format_context(_OutIt __out_it,
-                                basic_format_args<basic_format_context> __args,
-                                optional<std::locale>&& __loc)
-      : __out_it_(std::move(__out_it)), __args_(__args),
-        __loc_(std::move(__loc)) {}
-#else
+  _LIBCPP_HIDE_FROM_ABI explicit basic_format_context(
+      _OutIt __out_it, basic_format_args<basic_format_context> __args, optional<std::locale>&& __loc)
+      : __out_it_(std::move(__out_it)), __args_(__args), __loc_(std::move(__loc)) {}
+#  else
   template <class _OtherOutIt, class _OtherCharT>
   friend _LIBCPP_HIDE_FROM_ABI basic_format_context<_OtherOutIt, _OtherCharT>
       __format_context_create(_OtherOutIt, basic_format_args<basic_format_context<_OtherOutIt, _OtherCharT>>);
 
-  _LIBCPP_HIDE_FROM_ABI
-  explicit basic_format_context(_OutIt __out_it,
-                                basic_format_args<basic_format_context> __args)
+  _LIBCPP_HIDE_FROM_ABI explicit basic_format_context(_OutIt __out_it, basic_format_args<basic_format_context> __args)
       : __out_it_(std::move(__out_it)), __args_(__args) {}
-#endif
+#  endif
 };
 
 // A specialization for __retarget_buffer
diff --git a/libcxx/include/__format/format_functions.h b/libcxx/include/__format/format_functions.h
index 164592d2ec..0a1d809cb6 100644
--- a/libcxx/include/__format/format_functions.h
+++ b/libcxx/include/__format/format_functions.h
@@ -410,12 +410,12 @@ requires(output_iterator<_OutIt, const _CharT&>) _LIBCPP_HIDE_FROM_ABI _OutIt
         _OutIt __out_it, basic_string_view<_CharT> __fmt,
         basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
   if constexpr (same_as<_OutIt, _FormatOutIt>)
-    return std::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
-                                         std::__format_context_create(std::move(__out_it), __args));
+    return std::__format::__vformat_to(
+        basic_format_parse_context{__fmt, __args.__size()}, std::__format_context_create(std::move(__out_it), __args));
   else {
     __format::__format_buffer<_OutIt, _CharT> __buffer{std::move(__out_it)};
     std::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
-                                  std::__format_context_create(__buffer.__make_output_iterator(), __args));
+                                std::__format_context_create(__buffer.__make_output_iterator(), __args));
     return std::move(__buffer).__out_it();
   }
 }
@@ -440,16 +440,14 @@ vformat_to(_OutIt __out_it, wstring_view __fmt, wformat_args __args) {
 template <output_iterator<const char&> _OutIt, class... _Args>
 _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
 format_to(_OutIt __out_it, format_string<_Args...> __fmt, _Args&&... __args) {
-  return std::vformat_to(std::move(__out_it), __fmt.get(),
-                           std::make_format_args(__args...));
+  return std::vformat_to(std::move(__out_it), __fmt.get(), std::make_format_args(__args...));
 }
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <output_iterator<const wchar_t&> _OutIt, class... _Args>
 _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
 format_to(_OutIt __out_it, wformat_string<_Args...> __fmt, _Args&&... __args) {
-  return std::vformat_to(std::move(__out_it), __fmt.get(),
-                           std::make_wformat_args(__args...));
+  return std::vformat_to(std::move(__out_it), __fmt.get(), std::make_wformat_args(__args...));
 }
 #endif
 
@@ -495,7 +493,7 @@ _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __vformat_to_n(_OutIt __out_it,
                                                                 basic_format_args<_Context> __args) {
   __format::__format_to_n_buffer<_OutIt, _CharT> __buffer{std::move(__out_it), __n};
   std::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
-                                std::__format_context_create(__buffer.__make_output_iterator(), __args));
+                              std::__format_context_create(__buffer.__make_output_iterator(), __args));
   return std::move(__buffer).__result();
 }
 
@@ -518,7 +516,7 @@ template <class _CharT>
 _LIBCPP_HIDE_FROM_ABI size_t __vformatted_size(basic_string_view<_CharT> __fmt, auto __args) {
   __format::__formatted_size_buffer<_CharT> __buffer;
   std::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
-                                std::__format_context_create(__buffer.__make_output_iterator(), __args));
+                              std::__format_context_create(__buffer.__make_output_iterator(), __args));
   return std::move(__buffer).__result();
 }
 
@@ -544,9 +542,8 @@ requires(output_iterator<_OutIt, const _CharT&>) _LIBCPP_HIDE_FROM_ABI _OutIt
         _OutIt __out_it, locale __loc, basic_string_view<_CharT> __fmt,
         basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
   if constexpr (same_as<_OutIt, _FormatOutIt>)
-    return std::__format::__vformat_to(
-        basic_format_parse_context{__fmt, __args.__size()},
-        std::__format_context_create(std::move(__out_it), __args, std::move(__loc)));
+    return std::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
+                                       std::__format_context_create(std::move(__out_it), __args, std::move(__loc)));
   else {
     __format::__format_buffer<_OutIt, _CharT> __buffer{std::move(__out_it)};
     std::__format::__vformat_to(
@@ -559,32 +556,28 @@ requires(output_iterator<_OutIt, const _CharT&>) _LIBCPP_HIDE_FROM_ABI _OutIt
 template <output_iterator<const char&> _OutIt>
 _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt vformat_to(
     _OutIt __out_it, locale __loc, string_view __fmt, format_args __args) {
-  return std::__vformat_to(std::move(__out_it), std::move(__loc), __fmt,
-                             __args);
+  return std::__vformat_to(std::move(__out_it), std::move(__loc), __fmt, __args);
 }
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <output_iterator<const wchar_t&> _OutIt>
 _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt vformat_to(
     _OutIt __out_it, locale __loc, wstring_view __fmt, wformat_args __args) {
-  return std::__vformat_to(std::move(__out_it), std::move(__loc), __fmt,
-                             __args);
+  return std::__vformat_to(std::move(__out_it), std::move(__loc), __fmt, __args);
 }
 #endif
 
 template <output_iterator<const char&> _OutIt, class... _Args>
 _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
 format_to(_OutIt __out_it, locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
-  return std::vformat_to(std::move(__out_it), std::move(__loc), __fmt.get(),
-                           std::make_format_args(__args...));
+  return std::vformat_to(std::move(__out_it), std::move(__loc), __fmt.get(), std::make_format_args(__args...));
 }
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <output_iterator<const wchar_t&> _OutIt, class... _Args>
 _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
 format_to(_OutIt __out_it, locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
-  return std::vformat_to(std::move(__out_it), std::move(__loc), __fmt.get(),
-                           std::make_wformat_args(__args...));
+  return std::vformat_to(std::move(__out_it), std::move(__loc), __fmt.get(), std::make_wformat_args(__args...));
 }
 #endif
 
@@ -594,8 +587,7 @@ template <class = void>
 _LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI string
 vformat(locale __loc, string_view __fmt, format_args __args) {
   string __res;
-  std::vformat_to(std::back_inserter(__res), std::move(__loc), __fmt,
-                    __args);
+  std::vformat_to(std::back_inserter(__res), std::move(__loc), __fmt, __args);
   return __res;
 }
 
@@ -606,8 +598,7 @@ template <class = void>
 _LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI wstring
 vformat(locale __loc, wstring_view __fmt, wformat_args __args) {
   wstring __res;
-  std::vformat_to(std::back_inserter(__res), std::move(__loc), __fmt,
-                    __args);
+  std::vformat_to(std::back_inserter(__res), std::move(__loc), __fmt, __args);
   return __res;
 }
 #    endif
@@ -615,16 +606,14 @@ vformat(locale __loc, wstring_view __fmt, wformat_args __args) {
 template <class... _Args>
 _LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI string
 format(locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
-  return std::vformat(std::move(__loc), __fmt.get(),
-                        std::make_format_args(__args...));
+  return std::vformat(std::move(__loc), __fmt.get(), std::make_format_args(__args...));
 }
 
 #    ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <class... _Args>
 _LIBCPP_NODISCARD_EXT _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI wstring
 format(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
-  return std::vformat(std::move(__loc), __fmt.get(),
-                        std::make_wformat_args(__args...));
+  return std::vformat(std::move(__loc), __fmt.get(), std::make_wformat_args(__args...));
 }
 #    endif
 
@@ -643,8 +632,8 @@ template <output_iterator<const char&> _OutIt, class... _Args>
 _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt>
 format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, locale __loc, format_string<_Args...> __fmt,
             _Args&&... __args) {
-  return std::__vformat_to_n<format_context>(std::move(__out_it), __n, std::move(__loc), __fmt.get(),
-                                               std::make_format_args(__args...));
+  return std::__vformat_to_n<format_context>(
+      std::move(__out_it), __n, std::move(__loc), __fmt.get(), std::make_format_args(__args...));
 }
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
@@ -652,8 +641,8 @@ template <output_iterator<const wchar_t&> _OutIt, class... _Args>
 _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt>
 format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, locale __loc, wformat_string<_Args...> __fmt,
             _Args&&... __args) {
-  return std::__vformat_to_n<wformat_context>(std::move(__out_it), __n, std::move(__loc), __fmt.get(),
-                                                std::make_wformat_args(__args...));
+  return std::__vformat_to_n<wformat_context>(
+      std::move(__out_it), __n, std::move(__loc), __fmt.get(), std::make_wformat_args(__args...));
 }
 #endif
 
diff --git a/libcxx/include/__format/formatter_integral.h b/libcxx/include/__format/formatter_integral.h
index 598decb0a9..35ef15f762 100644
--- a/libcxx/include/__format/formatter_integral.h
+++ b/libcxx/include/__format/formatter_integral.h
@@ -315,7 +315,7 @@ _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator __format_integer(
     // The zero padding is done like:
     // - Write [sign][prefix]
     // - Write data right aligned with '0' as fill character.
-    __out_it             = __formatter::__copy(__begin, __first, std::move(__out_it));
+    __out_it                  = __formatter::__copy(__begin, __first, std::move(__out_it));
     __specs.__alignment_ = __format_spec::__alignment::__right;
     __specs.__fill_.__data[0] = _CharT('0');
     int32_t __size       = __first - __begin;
diff --git a/libcxx/include/__format/formatter_output.h b/libcxx/include/__format/formatter_output.h
index 2909fcd9ba..2721a4b24e 100644
--- a/libcxx/include/__format/formatter_output.h
+++ b/libcxx/include/__format/formatter_output.h
@@ -101,8 +101,7 @@ _LIBCPP_HIDE_FROM_ABI auto __copy(basic_string_view<_CharT> __str, output_iterat
   if constexpr (std::same_as<decltype(__out_it), std::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
     __out_it.__get_container()->__copy(__str);
     return __out_it;
-  } else if constexpr (std::same_as<decltype(__out_it),
-                                      typename __format::__retarget_buffer<_OutCharT>::__iterator>) {
+  } else if constexpr (std::same_as<decltype(__out_it), typename __format::__retarget_buffer<_OutCharT>::__iterator>) {
     __out_it.__buffer_->__copy(__str);
     return __out_it;
   } else {
@@ -135,8 +134,7 @@ __transform(const _CharT* __first,
   if constexpr (std::same_as<decltype(__out_it), std::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
     __out_it.__get_container()->__transform(__first, __last, std::move(__operation));
     return __out_it;
-  } else if constexpr (std::same_as<decltype(__out_it),
-                                      typename __format::__retarget_buffer<_OutCharT>::__iterator>) {
+  } else if constexpr (std::same_as<decltype(__out_it), typename __format::__retarget_buffer<_OutCharT>::__iterator>) {
     __out_it.__buffer_->__transform(__first, __last, std::move(__operation));
     return __out_it;
   } else {
diff --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h
index 61d99e1fd5..bec4aaeec5 100644
--- a/libcxx/include/__functional/bind.h
+++ b/libcxx/include/__functional/bind.h
@@ -95,7 +95,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 typename __invoke_of<_Ti&, _Uj...>::type
 __mu_expand(_Ti& __ti, tuple<_Uj...>& __uj, __tuple_indices<_Indx...>)
 {
-    return __ti(std::forward<_Uj>(std::get<_Indx>(__uj))...);
+  return __ti(std::forward<_Uj>(std::get<_Indx>(__uj))...);
 }
 
 template <class _Ti, class ..._Uj, __enable_if_t<is_bind_expression<_Ti>::value, int> = 0>
@@ -245,7 +245,7 @@ typename __bind_return<_Fp, _BoundArgs, _Args>::type
 __apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>,
                 _Args&& __args)
 {
-    return std::__invoke(__f, std::__mu(std::get<_Indx>(__bound_args), __args)...);
+  return std::__invoke(__f, std::__mu(std::get<_Indx>(__bound_args), __args)...);
 }
 
 template<class _Fp, class ..._BoundArgs>
@@ -260,20 +260,18 @@ private:
 
     typedef typename __make_tuple_indices<sizeof...(_BoundArgs)>::type __indices;
 public:
-    template <class _Gp, class ..._BA,
-              __enable_if_t<is_constructible<_Fd, _Gp>::value && !is_same<__libcpp_remove_reference_t<_Gp>, __bind>::value, int> = 0>
-      _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
-      explicit __bind(_Gp&& __f, _BA&& ...__bound_args)
-        : __f_(std::forward<_Gp>(__f)),
-          __bound_args_(std::forward<_BA>(__bound_args)...) {}
-
-    template <class ..._Args>
-        _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
-        typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type
-        operator()(_Args&& ...__args)
-        {
-            return std::__apply_functor(__f_, __bound_args_, __indices(),
-                                  tuple<_Args&&...>(std::forward<_Args>(__args)...));
+  template <
+      class _Gp,
+      class... _BA,
+      __enable_if_t<is_constructible<_Fd, _Gp>::value && !is_same<__libcpp_remove_reference_t<_Gp>, __bind>::value,
+                    int> = 0>
+  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bind(_Gp&& __f, _BA&&... __bound_args)
+      : __f_(std::forward<_Gp>(__f)), __bound_args_(std::forward<_BA>(__bound_args)...) {}
+
+  template <class... _Args>
+  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type
+  operator()(_Args&&... __args) {
+    return std::__apply_functor(__f_, __bound_args_, __indices(), tuple<_Args&&...>(std::forward<_Args>(__args)...));
         }
 
     template <class ..._Args>
@@ -281,8 +279,7 @@ public:
         typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type
         operator()(_Args&& ...__args) const
         {
-            return std::__apply_functor(__f_, __bound_args_, __indices(),
-                                   tuple<_Args&&...>(std::forward<_Args>(__args)...));
+      return std::__apply_functor(__f_, __bound_args_, __indices(), tuple<_Args&&...>(std::forward<_Args>(__args)...));
         }
 };
 
@@ -299,13 +296,13 @@ class __bind_r
 public:
     typedef _Rp result_type;
 
-
-    template <class _Gp, class ..._BA,
-              __enable_if_t<is_constructible<_Fd, _Gp>::value && !is_same<__libcpp_remove_reference_t<_Gp>, __bind_r>::value, int> = 0>
-      _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
-      explicit __bind_r(_Gp&& __f, _BA&& ...__bound_args)
-        : base(std::forward<_Gp>(__f),
-               std::forward<_BA>(__bound_args)...) {}
+    template <
+        class _Gp,
+        class... _BA,
+        __enable_if_t<is_constructible<_Fd, _Gp>::value && !is_same<__libcpp_remove_reference_t<_Gp>, __bind_r>::value,
+                      int> = 0>
+    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bind_r(_Gp&& __f, _BA&&... __bound_args)
+        : base(std::forward<_Gp>(__f), std::forward<_BA>(__bound_args)...) {}
 
     template <class ..._Args, __enable_if_t<is_convertible<typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type,
                                                            result_type>::value || is_void<_Rp>::value, int> = 0>
diff --git a/libcxx/include/__functional/bind_back.h b/libcxx/include/__functional/bind_back.h
index 5b5b405209..42abaa315b 100644
--- a/libcxx/include/__functional/bind_back.h
+++ b/libcxx/include/__functional/bind_back.h
@@ -31,11 +31,18 @@ struct __bind_back_op;
 
 template <size_t _NBound, size_t ..._Ip>
 struct __bind_back_op<_NBound, index_sequence<_Ip...>> {
-    template <class _Fn, class _BoundArgs, class... _Args>
-    _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Fn&& __f, _BoundArgs&& __bound_args, _Args&&... __args) const
-        noexcept(noexcept(std::invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)..., std::get<_Ip>(std::forward<_BoundArgs>(__bound_args))...)))
-        -> decltype(      std::invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)..., std::get<_Ip>(std::forward<_BoundArgs>(__bound_args))...))
-        { return          std::invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)..., std::get<_Ip>(std::forward<_BoundArgs>(__bound_args))...); }
+  template <class _Fn, class _BoundArgs, class... _Args>
+  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Fn&& __f, _BoundArgs&& __bound_args, _Args&&... __args) const
+      noexcept(noexcept(std::invoke(std::forward<_Fn>(__f),
+                                    std::forward<_Args>(__args)...,
+                                    std::get<_Ip>(std::forward<_BoundArgs>(__bound_args))...)))
+          -> decltype(std::invoke(std::forward<_Fn>(__f),
+                                  std::forward<_Args>(__args)...,
+                                  std::get<_Ip>(std::forward<_BoundArgs>(__bound_args))...)) {
+    return std::invoke(std::forward<_Fn>(__f),
+                       std::forward<_Args>(__args)...,
+                       std::get<_Ip>(std::forward<_BoundArgs>(__bound_args))...);
+  }
 };
 
 template <class _Fn, class _BoundArgs>
@@ -46,11 +53,14 @@ struct __bind_back_t : __perfect_forward<__bind_back_op<tuple_size_v<_BoundArgs>
 template <class _Fn, class... _Args>
   requires is_constructible_v<decay_t<_Fn>, _Fn> && is_move_constructible_v<decay_t<_Fn>> &&
            (is_constructible_v<decay_t<_Args>, _Args> && ...) && (is_move_constructible_v<decay_t<_Args>> && ...)
-_LIBCPP_HIDE_FROM_ABI
-constexpr auto __bind_back(_Fn&& __f, _Args&&... __args)
-    noexcept(noexcept(__bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...))))
-    -> decltype(      __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...)))
-    { return          __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...)); }
+_LIBCPP_HIDE_FROM_ABI constexpr auto __bind_back(_Fn&& __f, _Args&&... __args) noexcept(
+    noexcept(__bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(
+        std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...))))
+    -> decltype(__bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(
+        std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...))) {
+  return __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(
+      std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...));
+}
 
 #endif // _LIBCPP_STD_VER >= 20
 
diff --git a/libcxx/include/__functional/bind_front.h b/libcxx/include/__functional/bind_front.h
index d476243438..65b8593d9d 100644
--- a/libcxx/include/__functional/bind_front.h
+++ b/libcxx/include/__functional/bind_front.h
@@ -29,12 +29,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 #if _LIBCPP_STD_VER >= 20
 
 struct __bind_front_op {
-    template <class ..._Args>
-    _LIBCPP_HIDE_FROM_ABI
-    constexpr auto operator()(_Args&& ...__args) const
-        noexcept(noexcept(std::invoke(std::forward<_Args>(__args)...)))
-        -> decltype(      std::invoke(std::forward<_Args>(__args)...))
-        { return          std::invoke(std::forward<_Args>(__args)...); }
+  template <class... _Args>
+  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const
+      noexcept(noexcept(std::invoke(std::forward<_Args>(__args)...)))
+          -> decltype(std::invoke(std::forward<_Args>(__args)...)) {
+    return std::invoke(std::forward<_Args>(__args)...);
+  }
 };
 
 template <class _Fn, class ..._BoundArgs>
@@ -47,7 +47,7 @@ template <class _Fn, class... _Args>
            (is_constructible_v<decay_t<_Args>, _Args> && ...) && (is_move_constructible_v<decay_t<_Args>> && ...)
 _LIBCPP_HIDE_FROM_ABI
 constexpr auto bind_front(_Fn&& __f, _Args&&... __args) {
-    return __bind_front_t<decay_t<_Fn>, decay_t<_Args>...>(std::forward<_Fn>(__f), std::forward<_Args>(__args)...);
+  return __bind_front_t<decay_t<_Fn>, decay_t<_Args>...>(std::forward<_Fn>(__f), std::forward<_Args>(__args)...);
 }
 
 #endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__functional/compose.h b/libcxx/include/__functional/compose.h
index af207e7cba..4b37409cf2 100644
--- a/libcxx/include/__functional/compose.h
+++ b/libcxx/include/__functional/compose.h
@@ -25,12 +25,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 #if _LIBCPP_STD_VER >= 20
 
 struct __compose_op {
-    template<class _Fn1, class _Fn2, class ..._Args>
-    _LIBCPP_HIDE_FROM_ABI
-    constexpr auto operator()(_Fn1&& __f1, _Fn2&& __f2, _Args&&... __args) const
-        noexcept(noexcept(std::invoke(std::forward<_Fn1>(__f1), std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...))))
-        -> decltype(      std::invoke(std::forward<_Fn1>(__f1), std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...)))
-        { return          std::invoke(std::forward<_Fn1>(__f1), std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...)); }
+  template <class _Fn1, class _Fn2, class... _Args>
+  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Fn1&& __f1, _Fn2&& __f2, _Args&&... __args) const noexcept(noexcept(
+      std::invoke(std::forward<_Fn1>(__f1), std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...))))
+      -> decltype(std::invoke(std::forward<_Fn1>(__f1),
+                              std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...))) {
+    return std::invoke(std::forward<_Fn1>(__f1), std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...));
+  }
 };
 
 template <class _Fn1, class _Fn2>
@@ -39,11 +40,11 @@ struct __compose_t : __perfect_forward<__compose_op, _Fn1, _Fn2> {
 };
 
 template <class _Fn1, class _Fn2>
-_LIBCPP_HIDE_FROM_ABI
-constexpr auto __compose(_Fn1&& __f1, _Fn2&& __f2)
-    noexcept(noexcept(__compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2))))
-    -> decltype(      __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2)))
-    { return          __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2)); }
+_LIBCPP_HIDE_FROM_ABI constexpr auto __compose(_Fn1&& __f1, _Fn2&& __f2) noexcept(
+    noexcept(__compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2))))
+    -> decltype(__compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2))) {
+  return __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2));
+}
 
 #endif // _LIBCPP_STD_VER >= 20
 
diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h
index 7cc4cccc26..8ed0b7ca99 100644
--- a/libcxx/include/__functional/function.h
+++ b/libcxx/include/__functional/function.h
@@ -160,40 +160,23 @@ class __alloc_func<_Fp, _Ap, _Rp(_ArgTypes...)>
     _LIBCPP_HIDE_FROM_ABI
     const _Alloc& __get_allocator() const { return __f_.second(); }
 
-    _LIBCPP_HIDE_FROM_ABI
-    explicit __alloc_func(_Target&& __f)
-        : __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)),
-               std::forward_as_tuple())
-    {
-    }
+    _LIBCPP_HIDE_FROM_ABI explicit __alloc_func(_Target&& __f)
+        : __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)), std::forward_as_tuple()) {}
 
-    _LIBCPP_HIDE_FROM_ABI
-    explicit __alloc_func(const _Target& __f, const _Alloc& __a)
-        : __f_(piecewise_construct, std::forward_as_tuple(__f),
-               std::forward_as_tuple(__a))
-    {
-    }
+    _LIBCPP_HIDE_FROM_ABI explicit __alloc_func(const _Target& __f, const _Alloc& __a)
+        : __f_(piecewise_construct, std::forward_as_tuple(__f), std::forward_as_tuple(__a)) {}
 
-    _LIBCPP_HIDE_FROM_ABI
-    explicit __alloc_func(const _Target& __f, _Alloc&& __a)
-        : __f_(piecewise_construct, std::forward_as_tuple(__f),
-               std::forward_as_tuple(std::move(__a)))
-    {
-    }
+    _LIBCPP_HIDE_FROM_ABI explicit __alloc_func(const _Target& __f, _Alloc&& __a)
+        : __f_(piecewise_construct, std::forward_as_tuple(__f), std::forward_as_tuple(std::move(__a))) {}
 
-    _LIBCPP_HIDE_FROM_ABI
-    explicit __alloc_func(_Target&& __f, _Alloc&& __a)
-        : __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)),
-               std::forward_as_tuple(std::move(__a)))
-    {
-    }
+    _LIBCPP_HIDE_FROM_ABI explicit __alloc_func(_Target&& __f, _Alloc&& __a)
+        : __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)), std::forward_as_tuple(std::move(__a))) {}
 
     _LIBCPP_HIDE_FROM_ABI
     _Rp operator()(_ArgTypes&&... __arg)
     {
         typedef __invoke_void_return_wrapper<_Rp> _Invoker;
-        return _Invoker::__call(__f_.first(),
-                                std::forward<_ArgTypes>(__arg)...);
+        return _Invoker::__call(__f_.first(), std::forward<_ArgTypes>(__arg)...);
     }
 
     _LIBCPP_HIDE_FROM_ABI
@@ -230,8 +213,7 @@ public:
   _LIBCPP_HIDE_FROM_ABI
   const _Target& __target() const { return __f_; }
 
-  _LIBCPP_HIDE_FROM_ABI
-  explicit __default_alloc_func(_Target&& __f) : __f_(std::move(__f)) {}
+  _LIBCPP_HIDE_FROM_ABI explicit __default_alloc_func(_Target&& __f) : __f_(std::move(__f)) {}
 
   _LIBCPP_HIDE_FROM_ABI
   explicit __default_alloc_func(const _Target& __f) : __f_(__f) {}
@@ -294,31 +276,23 @@ class __func<_Fp, _Alloc, _Rp(_ArgTypes...)>
 {
     __alloc_func<_Fp, _Alloc, _Rp(_ArgTypes...)> __f_;
 public:
-    _LIBCPP_HIDE_FROM_ABI
-    explicit __func(_Fp&& __f)
-        : __f_(std::move(__f)) {}
+  _LIBCPP_HIDE_FROM_ABI explicit __func(_Fp&& __f) : __f_(std::move(__f)) {}
 
-    _LIBCPP_HIDE_FROM_ABI
-    explicit __func(const _Fp& __f, const _Alloc& __a)
-        : __f_(__f, __a) {}
+  _LIBCPP_HIDE_FROM_ABI explicit __func(const _Fp& __f, const _Alloc& __a) : __f_(__f, __a) {}
 
-    _LIBCPP_HIDE_FROM_ABI
-    explicit __func(const _Fp& __f, _Alloc&& __a)
-        : __f_(__f, std::move(__a)) {}
+  _LIBCPP_HIDE_FROM_ABI explicit __func(const _Fp& __f, _Alloc&& __a) : __f_(__f, std::move(__a)) {}
 
-    _LIBCPP_HIDE_FROM_ABI
-    explicit __func(_Fp&& __f, _Alloc&& __a)
-        : __f_(std::move(__f), std::move(__a)) {}
-
-    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual __base<_Rp(_ArgTypes...)>* __clone() const;
-    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void __clone(__base<_Rp(_ArgTypes...)>*) const;
-    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void destroy() _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void destroy_deallocate() _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual _Rp operator()(_ArgTypes&&... __arg);
-#ifndef _LIBCPP_HAS_NO_RTTI
-    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual const void* target(const type_info&) const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual const std::type_info& target_type() const _NOEXCEPT;
-#endif // _LIBCPP_HAS_NO_RTTI
+  _LIBCPP_HIDE_FROM_ABI explicit __func(_Fp&& __f, _Alloc&& __a) : __f_(std::move(__f), std::move(__a)) {}
+
+  _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual __base<_Rp(_ArgTypes...)>* __clone() const;
+  _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void __clone(__base<_Rp(_ArgTypes...)>*) const;
+  _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void destroy() _NOEXCEPT;
+  _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual void destroy_deallocate() _NOEXCEPT;
+  _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual _Rp operator()(_ArgTypes&&... __arg);
+#  ifndef _LIBCPP_HAS_NO_RTTI
+  _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual const void* target(const type_info&) const _NOEXCEPT;
+  _LIBCPP_HIDE_FROM_ABI_VIRTUAL virtual const std::type_info& target_type() const _NOEXCEPT;
+#  endif // _LIBCPP_HAS_NO_RTTI
 };
 
 template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
@@ -363,7 +337,7 @@ template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
 _Rp
 __func<_Fp, _Alloc, _Rp(_ArgTypes...)>::operator()(_ArgTypes&& ... __arg)
 {
-    return __f_(std::forward<_ArgTypes>(__arg)...);
+  return __f_(std::forward<_ArgTypes>(__arg)...);
 }
 
 #ifndef _LIBCPP_HAS_NO_RTTI
@@ -373,7 +347,7 @@ const void*
 __func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target(const type_info& __ti) const _NOEXCEPT
 {
     if (__ti == typeid(_Fp))
-        return std::addressof(__f_.__target());
+      return std::addressof(__f_.__target());
     return nullptr;
 }
 
@@ -423,8 +397,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
                 is_nothrow_copy_constructible<_Fp>::value &&
                 is_nothrow_copy_constructible<_FunAlloc>::value)
             {
-                __f_ =
-                    ::new ((void*)&__buf_) _Fun(std::move(__f), _Alloc(__af));
+              __f_ = ::new ((void*)&__buf_) _Fun(std::move(__f), _Alloc(__af));
             }
             else
             {
@@ -437,8 +410,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
     }
 
     template <class _Fp, __enable_if_t<!is_same<__decay_t<_Fp>, __value_func>::value, int> = 0>
-    _LIBCPP_HIDE_FROM_ABI explicit __value_func(_Fp&& __f)
-        : __value_func(std::forward<_Fp>(__f), allocator<_Fp>()) {}
+    _LIBCPP_HIDE_FROM_ABI explicit __value_func(_Fp&& __f) : __value_func(std::forward<_Fp>(__f), allocator<_Fp>()) {}
 
     _LIBCPP_HIDE_FROM_ABI
     __value_func(const __value_func& __f)
@@ -556,7 +528,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
             __f_ = __as_base(&__buf_);
         }
         else
-            std::swap(__f_, __f.__f_);
+          std::swap(__f_, __f.__f_);
     }
 
     _LIBCPP_HIDE_FROM_ABI
@@ -766,15 +738,13 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
             _FunAlloc __af(__a);
             if (__use_small_storage<_Fun>())
             {
-                ::new ((void*)&__buf_.__small)
-                    _Fun(std::move(__f), _Alloc(__af));
+              ::new ((void*)&__buf_.__small) _Fun(std::move(__f), _Alloc(__af));
             }
             else
             {
                 typedef __allocator_destructor<_FunAlloc> _Dp;
                 unique_ptr<_Fun, _Dp> __hold(__af.allocate(1), _Dp(__af, 1));
-                ::new ((void*)__hold.get())
-                    _Fun(std::move(__f), _Alloc(__af));
+                ::new ((void*)__hold.get()) _Fun(std::move(__f), _Alloc(__af));
                 __buf_.__large = __hold.release();
             }
         }
@@ -853,16 +823,15 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
     _LIBCPP_HIDE_FROM_ABI
     _Rp operator()(_ArgTypes&&... __args) const
     {
-        return __invoker_.__call_(std::addressof(__buf_),
-                                  std::forward<_ArgTypes>(__args)...);
+      return __invoker_.__call_(std::addressof(__buf_), std::forward<_ArgTypes>(__args)...);
     }
 
     _LIBCPP_HIDE_FROM_ABI
     void swap(__policy_func& __f)
     {
-        std::swap(__invoker_, __f.__invoker_);
-        std::swap(__policy_, __f.__policy_);
-        std::swap(__buf_, __f.__buf_);
+      std::swap(__invoker_, __f.__invoker_);
+      std::swap(__policy_, __f.__policy_);
+      std::swap(__buf_, __f.__buf_);
     }
 
     _LIBCPP_HIDE_FROM_ABI
@@ -951,11 +920,9 @@ public:
             "never be invoked.");
     }
 
-    virtual _Rp operator()(_ArgTypes&& ... __arg) {
-        return std::__invoke(__f_, std::forward<_ArgTypes>(__arg)...);
-    }
+    virtual _Rp operator()(_ArgTypes&&... __arg) { return std::__invoke(__f_, std::forward<_ArgTypes>(__arg)...); }
 
-#ifndef _LIBCPP_HAS_NO_RTTI
+#    ifndef _LIBCPP_HAS_NO_RTTI
     virtual const void* target(type_info const& __ti) const _NOEXCEPT {
         if (__ti == typeid(__func::__block_type))
             return &__f_;
@@ -1045,10 +1012,10 @@ public:
     _LIBCPP_HIDE_FROM_ABI void swap(function&) _NOEXCEPT;
 
 #if _LIBCPP_STD_VER <= 14
-    template<class _Fp, class _Alloc>
-      _LIBCPP_HIDE_FROM_ABI
-      void assign(_Fp&& __f, const _Alloc& __a)
-        {function(allocator_arg, __a, std::forward<_Fp>(__f)).swap(*this);}
+    template <class _Fp, class _Alloc>
+    _LIBCPP_HIDE_FROM_ABI void assign(_Fp&& __f, const _Alloc& __a) {
+      function(allocator_arg, __a, std::forward<_Fp>(__f)).swap(*this);
+    }
 #endif
 
     // function capacity:
@@ -1097,28 +1064,23 @@ function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&,
 #endif
 
 template <class _Rp, class... _ArgTypes>
-function<_Rp(_ArgTypes...)>::function(function&& __f) _NOEXCEPT
-    : __f_(std::move(__f.__f_)) {}
+function<_Rp(_ArgTypes...)>::function(function&& __f) _NOEXCEPT : __f_(std::move(__f.__f_)) {}
 
-#if _LIBCPP_STD_VER <= 14
-template<class _Rp, class ..._ArgTypes>
+#  if _LIBCPP_STD_VER <= 14
+template <class _Rp, class... _ArgTypes>
 template <class _Alloc>
-function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&,
-                                      function&& __f)
-    : __f_(std::move(__f.__f_)) {}
-#endif
+function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&, function&& __f) : __f_(std::move(__f.__f_)) {}
+#  endif
 
 template <class _Rp, class... _ArgTypes>
 template <class _Fp, class>
 function<_Rp(_ArgTypes...)>::function(_Fp __f) : __f_(std::move(__f)) {}
 
-#if _LIBCPP_STD_VER <= 14
+#  if _LIBCPP_STD_VER <= 14
 template <class _Rp, class... _ArgTypes>
 template <class _Fp, class _Alloc, class>
-function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc& __a,
-                                      _Fp __f)
-    : __f_(std::move(__f), __a) {}
-#endif
+function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc& __a, _Fp __f) : __f_(std::move(__f), __a) {}
+#  endif
 
 template<class _Rp, class ..._ArgTypes>
 function<_Rp(_ArgTypes...)>&
@@ -1132,8 +1094,8 @@ template<class _Rp, class ..._ArgTypes>
 function<_Rp(_ArgTypes...)>&
 function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT
 {
-    __f_ = std::move(__f.__f_);
-    return *this;
+  __f_ = std::move(__f.__f_);
+  return *this;
 }
 
 template<class _Rp, class ..._ArgTypes>
@@ -1149,8 +1111,8 @@ template <class _Fp, class>
 function<_Rp(_ArgTypes...)>&
 function<_Rp(_ArgTypes...)>::operator=(_Fp&& __f)
 {
-    function(std::forward<_Fp>(__f)).swap(*this);
-    return *this;
+  function(std::forward<_Fp>(__f)).swap(*this);
+  return *this;
 }
 
 template<class _Rp, class ..._ArgTypes>
@@ -1167,7 +1129,7 @@ template<class _Rp, class ..._ArgTypes>
 _Rp
 function<_Rp(_ArgTypes...)>::operator()(_ArgTypes... __arg) const
 {
-    return __f_(std::forward<_ArgTypes>(__arg)...);
+  return __f_(std::forward<_ArgTypes>(__arg)...);
 }
 
 #ifndef _LIBCPP_HAS_NO_RTTI
diff --git a/libcxx/include/__functional/identity.h b/libcxx/include/__functional/identity.h
index ee92c4130e..2412bfe3d7 100644
--- a/libcxx/include/__functional/identity.h
+++ b/libcxx/include/__functional/identity.h
@@ -41,7 +41,7 @@ struct identity {
     template<class _Tp>
     _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Tp&& operator()(_Tp&& __t) const noexcept
     {
-        return std::forward<_Tp>(__t);
+      return std::forward<_Tp>(__t);
     }
 
     using is_transparent = void;
diff --git a/libcxx/include/__functional/invoke.h b/libcxx/include/__functional/invoke.h
index df2f99fe27..46286331ba 100644
--- a/libcxx/include/__functional/invoke.h
+++ b/libcxx/include/__functional/invoke.h
@@ -27,7 +27,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 invoke_result_t<_Fn, _Args..
 invoke(_Fn&& __f, _Args&&... __args)
     noexcept(is_nothrow_invocable_v<_Fn, _Args...>)
 {
-    return std::__invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)...);
+  return std::__invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)...);
 }
 
 #endif // _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__functional/not_fn.h b/libcxx/include/__functional/not_fn.h
index bbd1a8bc35..2926112528 100644
--- a/libcxx/include/__functional/not_fn.h
+++ b/libcxx/include/__functional/not_fn.h
@@ -28,12 +28,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 #if _LIBCPP_STD_VER >= 17
 
 struct __not_fn_op {
-    template <class... _Args>
-    _LIBCPP_HIDE_FROM_ABI
-    _LIBCPP_CONSTEXPR_SINCE_CXX20 auto operator()(_Args&&... __args) const
-        noexcept(noexcept(!std::invoke(std::forward<_Args>(__args)...)))
-        -> decltype(      !std::invoke(std::forward<_Args>(__args)...))
-        { return          !std::invoke(std::forward<_Args>(__args)...); }
+  template <class... _Args>
+  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 auto operator()(_Args&&... __args) const
+      noexcept(noexcept(!std::invoke(std::forward<_Args>(__args)...)))
+          -> decltype(!std::invoke(std::forward<_Args>(__args)...)) {
+    return !std::invoke(std::forward<_Args>(__args)...);
+  }
 };
 
 template <class _Fn>
@@ -47,7 +47,7 @@ template <class _Fn, class = enable_if_t<
 >>
 _LIBCPP_HIDE_FROM_ABI
 _LIBCPP_CONSTEXPR_SINCE_CXX20 auto not_fn(_Fn&& __f) {
-    return __not_fn_t<decay_t<_Fn>>(std::forward<_Fn>(__f));
+  return __not_fn_t<decay_t<_Fn>>(std::forward<_Fn>(__f));
 }
 
 #endif // _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__functional/operations.h b/libcxx/include/__functional/operations.h
index 23928e9fc2..c33a7d17f1 100644
--- a/libcxx/include/__functional/operations.h
+++ b/libcxx/include/__functional/operations.h
@@ -52,12 +52,12 @@ struct __desugars_to<__plus_tag, plus<void>, _Tp, _Up> : true_type {};
 template <>
 struct _LIBCPP_TEMPLATE_VIS plus<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) + std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) + std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) + std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) + std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) + std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) + std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -81,12 +81,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(minus);
 template <>
 struct _LIBCPP_TEMPLATE_VIS minus<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) - std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) - std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) - std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) - std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) - std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) - std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -110,12 +110,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(multiplies);
 template <>
 struct _LIBCPP_TEMPLATE_VIS multiplies<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) * std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) * std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) * std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) * std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) * std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) * std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -139,12 +139,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(divides);
 template <>
 struct _LIBCPP_TEMPLATE_VIS divides<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) / std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) / std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) / std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) / std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) / std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) / std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -168,12 +168,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(modulus);
 template <>
 struct _LIBCPP_TEMPLATE_VIS modulus<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) % std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) % std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) % std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) % std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) % std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) % std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -197,12 +197,11 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(negate);
 template <>
 struct _LIBCPP_TEMPLATE_VIS negate<void>
 {
-    template <class _Tp>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_Tp&& __x) const
-        noexcept(noexcept(- std::forward<_Tp>(__x)))
-        -> decltype(      - std::forward<_Tp>(__x))
-        { return          - std::forward<_Tp>(__x); }
+  template <class _Tp>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
+      noexcept(noexcept(-std::forward<_Tp>(__x))) -> decltype(-std::forward<_Tp>(__x)) {
+    return -std::forward<_Tp>(__x);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -228,12 +227,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_and);
 template <>
 struct _LIBCPP_TEMPLATE_VIS bit_and<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) & std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) & std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) & std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) & std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) & std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) & std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -252,12 +251,11 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_not);
 template <>
 struct _LIBCPP_TEMPLATE_VIS bit_not<void>
 {
-    template <class _Tp>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_Tp&& __x) const
-        noexcept(noexcept(~std::forward<_Tp>(__x)))
-        -> decltype(      ~std::forward<_Tp>(__x))
-        { return          ~std::forward<_Tp>(__x); }
+  template <class _Tp>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
+      noexcept(noexcept(~std::forward<_Tp>(__x))) -> decltype(~std::forward<_Tp>(__x)) {
+    return ~std::forward<_Tp>(__x);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -281,12 +279,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_or);
 template <>
 struct _LIBCPP_TEMPLATE_VIS bit_or<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) | std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) | std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) | std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) | std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) | std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) | std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -310,12 +308,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_xor);
 template <>
 struct _LIBCPP_TEMPLATE_VIS bit_xor<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) ^ std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) ^ std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) ^ std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) ^ std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) ^ std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) ^ std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -341,12 +339,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(equal_to);
 template <>
 struct _LIBCPP_TEMPLATE_VIS equal_to<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) == std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) == std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) == std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) == std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) == std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) == std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -379,12 +377,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(not_equal_to);
 template <>
 struct _LIBCPP_TEMPLATE_VIS not_equal_to<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) != std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) != std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) != std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) != std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) != std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) != std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -408,12 +406,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less);
 template <>
 struct _LIBCPP_TEMPLATE_VIS less<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) < std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) < std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) < std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) < std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) < std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) < std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -437,12 +435,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less_equal);
 template <>
 struct _LIBCPP_TEMPLATE_VIS less_equal<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) <= std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) <= std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) <= std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) <= std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) <= std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) <= std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -466,12 +464,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater_equal);
 template <>
 struct _LIBCPP_TEMPLATE_VIS greater_equal<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) >= std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) >= std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) >= std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) >= std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) >= std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) >= std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -495,12 +493,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater);
 template <>
 struct _LIBCPP_TEMPLATE_VIS greater<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) > std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) > std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) > std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) > std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) > std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) > std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -526,12 +524,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_and);
 template <>
 struct _LIBCPP_TEMPLATE_VIS logical_and<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) && std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) && std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) && std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) && std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) && std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) && std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -555,12 +553,11 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_not);
 template <>
 struct _LIBCPP_TEMPLATE_VIS logical_not<void>
 {
-    template <class _Tp>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_Tp&& __x) const
-        noexcept(noexcept(!std::forward<_Tp>(__x)))
-        -> decltype(      !std::forward<_Tp>(__x))
-        { return          !std::forward<_Tp>(__x); }
+  template <class _Tp>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
+      noexcept(noexcept(!std::forward<_Tp>(__x))) -> decltype(!std::forward<_Tp>(__x)) {
+    return !std::forward<_Tp>(__x);
+  }
     typedef void is_transparent;
 };
 #endif
@@ -584,12 +581,12 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_or);
 template <>
 struct _LIBCPP_TEMPLATE_VIS logical_or<void>
 {
-    template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
-    auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(std::forward<_T1>(__t) || std::forward<_T2>(__u)))
-        -> decltype(      std::forward<_T1>(__t) || std::forward<_T2>(__u))
-        { return          std::forward<_T1>(__t) || std::forward<_T2>(__u); }
+  template <class _T1, class _T2>
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+      noexcept(noexcept(std::forward<_T1>(__t) || std::forward<_T2>(__u)))
+          -> decltype(std::forward<_T1>(__t) || std::forward<_T2>(__u)) {
+    return std::forward<_T1>(__t) || std::forward<_T2>(__u);
+  }
     typedef void is_transparent;
 };
 #endif
diff --git a/libcxx/include/__functional/perfect_forward.h b/libcxx/include/__functional/perfect_forward.h
index 2fbb623a7d..76883d5924 100644
--- a/libcxx/include/__functional/perfect_forward.h
+++ b/libcxx/include/__functional/perfect_forward.h
@@ -40,11 +40,9 @@ private:
   tuple<_BoundArgs...> __bound_args_;
 
 public:
-  template <class... _Args, class = enable_if_t<
-    is_constructible_v<tuple<_BoundArgs...>, _Args&&...>
-  >>
+  template <class... _Args, class = enable_if_t< is_constructible_v<tuple<_BoundArgs...>, _Args&&...> >>
   _LIBCPP_HIDE_FROM_ABI explicit constexpr __perfect_forward_impl(_Args&&... __bound_args)
-    : __bound_args_(std::forward<_Args>(__bound_args)...) {}
+      : __bound_args_(std::forward<_Args>(__bound_args)...) {}
 
   _LIBCPP_HIDE_FROM_ABI __perfect_forward_impl(__perfect_forward_impl const&) = default;
   _LIBCPP_HIDE_FROM_ABI __perfect_forward_impl(__perfect_forward_impl&&) = default;
@@ -53,37 +51,41 @@ public:
   _LIBCPP_HIDE_FROM_ABI __perfect_forward_impl& operator=(__perfect_forward_impl&&) = default;
 
   template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs&..., _Args...>>>
-  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) &
-    noexcept(noexcept(_Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...)))
-    -> decltype(      _Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...))
-    { return          _Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...); }
+  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) & noexcept(
+      noexcept(_Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...)))
+      -> decltype(_Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...)) {
+    return _Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...);
+  }
 
   template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs&..., _Args...>>>
   auto operator()(_Args&&...) & = delete;
 
   template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs const&..., _Args...>>>
-  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&
-    noexcept(noexcept(_Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...)))
-    -> decltype(      _Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...))
-    { return          _Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...); }
+  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const& noexcept(
+      noexcept(_Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...)))
+      -> decltype(_Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...)) {
+    return _Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...);
+  }
 
   template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs const&..., _Args...>>>
   auto operator()(_Args&&...) const& = delete;
 
   template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs..., _Args...>>>
-  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) &&
-    noexcept(noexcept(_Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...)))
-    -> decltype(      _Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...))
-    { return          _Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...); }
+  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) && noexcept(
+      noexcept(_Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...)))
+      -> decltype(_Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...)) {
+    return _Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...);
+  }
 
   template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs..., _Args...>>>
   auto operator()(_Args&&...) && = delete;
 
   template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs const..., _Args...>>>
-  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&&
-    noexcept(noexcept(_Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...)))
-    -> decltype(      _Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...))
-    { return          _Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...); }
+  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&& noexcept(
+      noexcept(_Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...)))
+      -> decltype(_Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...)) {
+    return _Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...);
+  }
 
   template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs const..., _Args...>>>
   auto operator()(_Args&&...) const&& = delete;
diff --git a/libcxx/include/__functional/ranges_operations.h b/libcxx/include/__functional/ranges_operations.h
index 0ed631d8a7..38b2801804 100644
--- a/libcxx/include/__functional/ranges_operations.h
+++ b/libcxx/include/__functional/ranges_operations.h
@@ -29,8 +29,8 @@ namespace ranges {
 
 struct equal_to {
   template <class _Tp, class _Up>
-  requires equality_comparable_with<_Tp, _Up>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
+    requires equality_comparable_with<_Tp, _Up>
+  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t, _Up&& __u) const
       noexcept(noexcept(bool(std::forward<_Tp>(__t) == std::forward<_Up>(__u)))) {
     return std::forward<_Tp>(__t) == std::forward<_Up>(__u);
   }
@@ -40,8 +40,8 @@ struct equal_to {
 
 struct not_equal_to {
   template <class _Tp, class _Up>
-  requires equality_comparable_with<_Tp, _Up>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
+    requires equality_comparable_with<_Tp, _Up>
+  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t, _Up&& __u) const
       noexcept(noexcept(bool(!(std::forward<_Tp>(__t) == std::forward<_Up>(__u))))) {
     return !(std::forward<_Tp>(__t) == std::forward<_Up>(__u));
   }
@@ -51,8 +51,8 @@ struct not_equal_to {
 
 struct less {
   template <class _Tp, class _Up>
-  requires totally_ordered_with<_Tp, _Up>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
+    requires totally_ordered_with<_Tp, _Up>
+  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t, _Up&& __u) const
       noexcept(noexcept(bool(std::forward<_Tp>(__t) < std::forward<_Up>(__u)))) {
     return std::forward<_Tp>(__t) < std::forward<_Up>(__u);
   }
@@ -62,8 +62,8 @@ struct less {
 
 struct less_equal {
   template <class _Tp, class _Up>
-  requires totally_ordered_with<_Tp, _Up>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
+    requires totally_ordered_with<_Tp, _Up>
+  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t, _Up&& __u) const
       noexcept(noexcept(bool(!(std::forward<_Up>(__u) < std::forward<_Tp>(__t))))) {
     return !(std::forward<_Up>(__u) < std::forward<_Tp>(__t));
   }
@@ -73,8 +73,8 @@ struct less_equal {
 
 struct greater {
   template <class _Tp, class _Up>
-  requires totally_ordered_with<_Tp, _Up>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
+    requires totally_ordered_with<_Tp, _Up>
+  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t, _Up&& __u) const
       noexcept(noexcept(bool(std::forward<_Up>(__u) < std::forward<_Tp>(__t)))) {
     return std::forward<_Up>(__u) < std::forward<_Tp>(__t);
   }
@@ -84,8 +84,8 @@ struct greater {
 
 struct greater_equal {
   template <class _Tp, class _Up>
-  requires totally_ordered_with<_Tp, _Up>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
+    requires totally_ordered_with<_Tp, _Up>
+  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t, _Up&& __u) const
       noexcept(noexcept(bool(!(std::forward<_Tp>(__t) < std::forward<_Up>(__u))))) {
     return !(std::forward<_Tp>(__t) < std::forward<_Up>(__u));
   }
diff --git a/libcxx/include/__functional/reference_wrapper.h b/libcxx/include/__functional/reference_wrapper.h
index 3688590d10..e25c5ff9e0 100644
--- a/libcxx/include/__functional/reference_wrapper.h
+++ b/libcxx/include/__functional/reference_wrapper.h
@@ -42,7 +42,7 @@ public:
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
     reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(std::declval<_Up>()))) {
         type& __f = static_cast<_Up&&>(__u);
-        __f_ = std::addressof(__f);
+        __f_      = std::addressof(__f);
     }
 
     // access
diff --git a/libcxx/include/__functional/weak_result_type.h b/libcxx/include/__functional/weak_result_type.h
index da6fe54bfa..6bb2f6c7c5 100644
--- a/libcxx/include/__functional/weak_result_type.h
+++ b/libcxx/include/__functional/weak_result_type.h
@@ -286,7 +286,7 @@ struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const volatile>
 template <class _Tp, class ..._Args>
 struct __invoke_return
 {
-    typedef decltype(std::__invoke(std::declval<_Tp>(), std::declval<_Args>()...)) type;
+  typedef decltype(std::__invoke(std::declval<_Tp>(), std::declval<_Args>()...)) type;
 };
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__iterator/advance.h b/libcxx/include/__iterator/advance.h
index 76938970b0..ad9b7d9812 100644
--- a/libcxx/include/__iterator/advance.h
+++ b/libcxx/include/__iterator/advance.h
@@ -58,12 +58,11 @@ void __advance(_RandIter& __i, typename iterator_traits<_RandIter>::difference_t
   __i += __n;
 }
 
-template <
-    class _InputIter, class _Distance,
-    class _IntegralDistance = decltype(std::__convert_to_integral(std::declval<_Distance>())),
-    class = __enable_if_t<is_integral<_IntegralDistance>::value> >
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
-void advance(_InputIter& __i, _Distance __orig_n) {
+template < class _InputIter,
+           class _Distance,
+           class _IntegralDistance = decltype(std::__convert_to_integral(std::declval<_Distance>())),
+           class                   = __enable_if_t<is_integral<_IntegralDistance>::value> >
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 void advance(_InputIter& __i, _Distance __orig_n) {
   typedef typename iterator_traits<_InputIter>::difference_type _Difference;
   _Difference __n = static_cast<_Difference>(std::__convert_to_integral(__orig_n));
   _LIBCPP_ASSERT_UNCATEGORIZED(__n >= 0 || __has_bidirectional_iterator_category<_InputIter>::value,
diff --git a/libcxx/include/__iterator/back_insert_iterator.h b/libcxx/include/__iterator/back_insert_iterator.h
index f022d3bdf8..ef8983a2ee 100644
--- a/libcxx/include/__iterator/back_insert_iterator.h
+++ b/libcxx/include/__iterator/back_insert_iterator.h
@@ -48,12 +48,16 @@ public:
     typedef void reference;
     typedef _Container container_type;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit back_insert_iterator(_Container& __x) : container(std::addressof(__x)) {}
+    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit back_insert_iterator(_Container& __x)
+        : container(std::addressof(__x)) {}
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator=(const typename _Container::value_type& __value)
         {container->push_back(__value); return *this;}
 #ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator=(typename _Container::value_type&& __value)
-        {container->push_back(std::move(__value)); return *this;}
+    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator&
+    operator=(typename _Container::value_type&& __value) {
+      container->push_back(std::move(__value));
+      return *this;
+    }
 #endif // _LIBCPP_CXX03_LANG
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator*()     {return *this;}
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator++()    {return *this;}
diff --git a/libcxx/include/__iterator/common_iterator.h b/libcxx/include/__iterator/common_iterator.h
index d7c308d8da..312655e4ec 100644
--- a/libcxx/include/__iterator/common_iterator.h
+++ b/libcxx/include/__iterator/common_iterator.h
@@ -147,7 +147,8 @@ public:
   _LIBCPP_HIDE_FROM_ABI common_iterator& operator++() {
     _LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__hold_),
                                  "Attempted to increment a non-dereferenceable common_iterator");
-    ++std::__unchecked_get<_Iter>(__hold_); return *this;
+    ++std::__unchecked_get<_Iter>(__hold_);
+    return *this;
   }
 
   _LIBCPP_HIDE_FROM_ABI decltype(auto) operator++(int) {
@@ -204,12 +205,12 @@ public:
       return true;
 
     if (__x_index == 0 && __y_index == 0)
-      return  std::__unchecked_get<_Iter>(__x.__hold_) ==  std::__unchecked_get<_I2>(__y.__hold_);
+      return std::__unchecked_get<_Iter>(__x.__hold_) == std::__unchecked_get<_I2>(__y.__hold_);
 
     if (__x_index == 0)
-      return  std::__unchecked_get<_Iter>(__x.__hold_) == std::__unchecked_get<_S2>(__y.__hold_);
+      return std::__unchecked_get<_Iter>(__x.__hold_) == std::__unchecked_get<_S2>(__y.__hold_);
 
-    return std::__unchecked_get<_Sent>(__x.__hold_) ==  std::__unchecked_get<_I2>(__y.__hold_);
+    return std::__unchecked_get<_Sent>(__x.__hold_) == std::__unchecked_get<_I2>(__y.__hold_);
   }
 
   template<sized_sentinel_for<_Iter> _I2, sized_sentinel_for<_Iter> _S2>
@@ -228,10 +229,10 @@ public:
       return 0;
 
     if (__x_index == 0 && __y_index == 0)
-      return  std::__unchecked_get<_Iter>(__x.__hold_) - std::__unchecked_get<_I2>(__y.__hold_);
+      return std::__unchecked_get<_Iter>(__x.__hold_) - std::__unchecked_get<_I2>(__y.__hold_);
 
     if (__x_index == 0)
-      return  std::__unchecked_get<_Iter>(__x.__hold_) - std::__unchecked_get<_S2>(__y.__hold_);
+      return std::__unchecked_get<_Iter>(__x.__hold_) - std::__unchecked_get<_S2>(__y.__hold_);
 
     return std::__unchecked_get<_Sent>(__x.__hold_) - std::__unchecked_get<_I2>(__y.__hold_);
   }
@@ -242,7 +243,7 @@ public:
   {
     _LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__i.__hold_),
                                  "Attempted to iter_move a non-dereferenceable common_iterator");
-    return ranges::iter_move( std::__unchecked_get<_Iter>(__i.__hold_));
+    return ranges::iter_move(std::__unchecked_get<_Iter>(__i.__hold_));
   }
 
   template<indirectly_swappable<_Iter> _I2, class _S2>
diff --git a/libcxx/include/__iterator/concepts.h b/libcxx/include/__iterator/concepts.h
index 614de85847..d83d234d22 100644
--- a/libcxx/include/__iterator/concepts.h
+++ b/libcxx/include/__iterator/concepts.h
@@ -69,14 +69,14 @@ template<indirectly_readable _Tp>
 using iter_common_reference_t = common_reference_t<iter_reference_t<_Tp>, iter_value_t<_Tp>&>;
 
 // [iterator.concept.writable]
-template<class _Out, class _Tp>
-concept indirectly_writable =
-  requires(_Out&& __o, _Tp&& __t) {
-    *__o = std::forward<_Tp>(__t);                        // not required to be equality-preserving
-    *std::forward<_Out>(__o) = std::forward<_Tp>(__t);  // not required to be equality-preserving
-    const_cast<const iter_reference_t<_Out>&&>(*__o) = std::forward<_Tp>(__t);                       // not required to be equality-preserving
-    const_cast<const iter_reference_t<_Out>&&>(*std::forward<_Out>(__o)) = std::forward<_Tp>(__t); // not required to be equality-preserving
-  };
+template <class _Out, class _Tp>
+concept indirectly_writable = requires(_Out&& __o, _Tp&& __t) {
+  *__o                                             = std::forward<_Tp>(__t); // not required to be equality-preserving
+  *std::forward<_Out>(__o)                         = std::forward<_Tp>(__t); // not required to be equality-preserving
+  const_cast<const iter_reference_t<_Out>&&>(*__o) = std::forward<_Tp>(__t); // not required to be equality-preserving
+  const_cast<const iter_reference_t<_Out>&&>(*std::forward<_Out>(__o)) =
+      std::forward<_Tp>(__t); // not required to be equality-preserving
+};
 
 // [iterator.concept.winc]
 template<class _Tp>
@@ -142,13 +142,11 @@ concept input_iterator =
   derived_from<_ITER_CONCEPT<_Ip>, input_iterator_tag>;
 
 // [iterator.concept.output]
-template<class _Ip, class _Tp>
+template <class _Ip, class _Tp>
 concept output_iterator =
-  input_or_output_iterator<_Ip> &&
-  indirectly_writable<_Ip, _Tp> &&
-  requires (_Ip __it, _Tp&& __t) {
-    *__it++ = std::forward<_Tp>(__t); // not required to be equality-preserving
-  };
+    input_or_output_iterator<_Ip> && indirectly_writable<_Ip, _Tp> && requires(_Ip __it, _Tp&& __t) {
+      *__it++ = std::forward<_Tp>(__t); // not required to be equality-preserving
+    };
 
 // [iterator.concept.forward]
 template<class _Ip>
@@ -183,15 +181,13 @@ concept random_access_iterator =
     {  __j[__n]  } -> same_as<iter_reference_t<_Ip>>;
   };
 
-template<class _Ip>
+template <class _Ip>
 concept contiguous_iterator =
-  random_access_iterator<_Ip> &&
-  derived_from<_ITER_CONCEPT<_Ip>, contiguous_iterator_tag> &&
-  is_lvalue_reference_v<iter_reference_t<_Ip>> &&
-  same_as<iter_value_t<_Ip>, remove_cvref_t<iter_reference_t<_Ip>>> &&
-  requires(const _Ip& __i) {
-    { std::to_address(__i) } -> same_as<add_pointer_t<iter_reference_t<_Ip>>>;
-  };
+    random_access_iterator<_Ip> && derived_from<_ITER_CONCEPT<_Ip>, contiguous_iterator_tag> &&
+    is_lvalue_reference_v<iter_reference_t<_Ip>> && same_as<iter_value_t<_Ip>, remove_cvref_t<iter_reference_t<_Ip>>> &&
+    requires(const _Ip& __i) {
+      { std::to_address(__i) } -> same_as<add_pointer_t<iter_reference_t<_Ip>>>;
+    };
 
 template<class _Ip>
 concept __has_arrow = input_iterator<_Ip> && (is_pointer_v<_Ip> || requires(_Ip __i) { __i.operator->(); });
diff --git a/libcxx/include/__iterator/counted_iterator.h b/libcxx/include/__iterator/counted_iterator.h
index 171c0d7f0e..5fca51f5f7 100644
--- a/libcxx/include/__iterator/counted_iterator.h
+++ b/libcxx/include/__iterator/counted_iterator.h
@@ -80,9 +80,8 @@ public:
   _LIBCPP_HIDE_FROM_ABI
   constexpr counted_iterator() requires default_initializable<_Iter> = default;
 
-  _LIBCPP_HIDE_FROM_ABI
-  constexpr counted_iterator(_Iter __iter, iter_difference_t<_Iter> __n)
-   : __current_(std::move(__iter)), __count_(__n) {
+  _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator(_Iter __iter, iter_difference_t<_Iter> __n)
+      : __current_(std::move(__iter)), __count_(__n) {
     _LIBCPP_ASSERT_UNCATEGORIZED(__n >= 0, "__n must not be negative.");
   }
 
@@ -104,8 +103,7 @@ public:
   _LIBCPP_HIDE_FROM_ABI
   constexpr const _Iter& base() const& noexcept { return __current_; }
 
-  _LIBCPP_HIDE_FROM_ABI
-  constexpr _Iter base() && { return std::move(__current_); }
+  _LIBCPP_HIDE_FROM_ABI constexpr _Iter base() && { return std::move(__current_); }
 
   _LIBCPP_HIDE_FROM_ABI
   constexpr iter_difference_t<_Iter> count() const noexcept { return __count_; }
diff --git a/libcxx/include/__iterator/distance.h b/libcxx/include/__iterator/distance.h
index 83a9265390..5f8aa5f098 100644
--- a/libcxx/include/__iterator/distance.h
+++ b/libcxx/include/__iterator/distance.h
@@ -50,7 +50,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
 typename iterator_traits<_InputIter>::difference_type
 distance(_InputIter __first, _InputIter __last)
 {
-    return std::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
+  return std::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
 }
 
 #if _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__iterator/front_insert_iterator.h b/libcxx/include/__iterator/front_insert_iterator.h
index f9aa442177..ef1eeb7017 100644
--- a/libcxx/include/__iterator/front_insert_iterator.h
+++ b/libcxx/include/__iterator/front_insert_iterator.h
@@ -48,12 +48,16 @@ public:
     typedef void reference;
     typedef _Container container_type;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit front_insert_iterator(_Container& __x) : container(std::addressof(__x)) {}
+    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit front_insert_iterator(_Container& __x)
+        : container(std::addressof(__x)) {}
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator=(const typename _Container::value_type& __value)
         {container->push_front(__value); return *this;}
 #ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator=(typename _Container::value_type&& __value)
-        {container->push_front(std::move(__value)); return *this;}
+    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator&
+    operator=(typename _Container::value_type&& __value) {
+      container->push_front(std::move(__value));
+      return *this;
+    }
 #endif // _LIBCPP_CXX03_LANG
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator*()     {return *this;}
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator++()    {return *this;}
diff --git a/libcxx/include/__iterator/insert_iterator.h b/libcxx/include/__iterator/insert_iterator.h
index 1a9c74a16f..8f988b949f 100644
--- a/libcxx/include/__iterator/insert_iterator.h
+++ b/libcxx/include/__iterator/insert_iterator.h
@@ -58,13 +58,18 @@ public:
     typedef void reference;
     typedef _Container container_type;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i)
+    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
+    insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i)
         : container(std::addressof(__x)), iter(__i) {}
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator=(const typename _Container::value_type& __value)
         {iter = container->insert(iter, __value); ++iter; return *this;}
 #ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator=(typename _Container::value_type&& __value)
-        {iter = container->insert(iter, std::move(__value)); ++iter; return *this;}
+    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator&
+    operator=(typename _Container::value_type&& __value) {
+      iter = container->insert(iter, std::move(__value));
+      ++iter;
+      return *this;
+    }
 #endif // _LIBCPP_CXX03_LANG
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator*()        {return *this;}
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator++()       {return *this;}
diff --git a/libcxx/include/__iterator/istream_iterator.h b/libcxx/include/__iterator/istream_iterator.h
index 2efe5772ba..d9c9bfcabc 100644
--- a/libcxx/include/__iterator/istream_iterator.h
+++ b/libcxx/include/__iterator/istream_iterator.h
@@ -51,14 +51,13 @@ public:
 #if _LIBCPP_STD_VER >= 20
     _LIBCPP_HIDE_FROM_ABI constexpr istream_iterator(default_sentinel_t) : istream_iterator() {}
 #endif // _LIBCPP_STD_VER >= 20
-    _LIBCPP_HIDE_FROM_ABI istream_iterator(istream_type& __s) : __in_stream_(std::addressof(__s))
-        {
-            if (!(*__in_stream_ >> __value_))
-                __in_stream_ = nullptr;
-        }
+    _LIBCPP_HIDE_FROM_ABI istream_iterator(istream_type& __s) : __in_stream_(std::addressof(__s)) {
+      if (!(*__in_stream_ >> __value_))
+        __in_stream_ = nullptr;
+    }
 
     _LIBCPP_HIDE_FROM_ABI const _Tp& operator*() const {return __value_;}
-    _LIBCPP_HIDE_FROM_ABI const _Tp* operator->() const {return std::addressof((operator*()));}
+    _LIBCPP_HIDE_FROM_ABI const _Tp* operator->() const { return std::addressof((operator*())); }
     _LIBCPP_HIDE_FROM_ABI istream_iterator& operator++()
         {
             if (!(*__in_stream_ >> __value_))
diff --git a/libcxx/include/__iterator/iter_swap.h b/libcxx/include/__iterator/iter_swap.h
index 23d3e4009f..e1ba7f94b5 100644
--- a/libcxx/include/__iterator/iter_swap.h
+++ b/libcxx/include/__iterator/iter_swap.h
@@ -58,35 +58,28 @@ namespace __iter_swap {
     // NOLINTBEGIN(libcpp-robust-against-adl) iter_swap ADL calls should only be made through ranges::iter_swap
     template <class _T1, class _T2>
       requires __unqualified_iter_swap<_T1, _T2>
-    _LIBCPP_HIDE_FROM_ABI
-    constexpr void operator()(_T1&& __x, _T2&& __y) const
-      noexcept(noexcept(iter_swap(std::forward<_T1>(__x), std::forward<_T2>(__y))))
-    {
+    _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_T1&& __x, _T2&& __y) const
+        noexcept(noexcept(iter_swap(std::forward<_T1>(__x), std::forward<_T2>(__y)))) {
       (void)iter_swap(std::forward<_T1>(__x), std::forward<_T2>(__y));
     }
     // NOLINTEND(libcpp-robust-against-adl)
 
     template <class _T1, class _T2>
-      requires (!__unqualified_iter_swap<_T1, _T2>) &&
-               __readable_swappable<_T1, _T2>
-    _LIBCPP_HIDE_FROM_ABI
-    constexpr void operator()(_T1&& __x, _T2&& __y) const
-      noexcept(noexcept(ranges::swap(*std::forward<_T1>(__x), *std::forward<_T2>(__y))))
-    {
+      requires(!__unqualified_iter_swap<_T1, _T2>) && __readable_swappable<_T1, _T2>
+    _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_T1&& __x, _T2&& __y) const
+        noexcept(noexcept(ranges::swap(*std::forward<_T1>(__x), *std::forward<_T2>(__y)))) {
       ranges::swap(*std::forward<_T1>(__x), *std::forward<_T2>(__y));
     }
 
     template <class _T1, class _T2>
-      requires (!__unqualified_iter_swap<_T1, _T2> && //
-                !__readable_swappable<_T1, _T2>) && //
-               indirectly_movable_storable<_T1, _T2> && //
-               indirectly_movable_storable<_T2, _T1>
-    _LIBCPP_HIDE_FROM_ABI
-    constexpr void operator()(_T1&& __x, _T2&& __y) const
-      noexcept(noexcept(iter_value_t<_T2>(ranges::iter_move(__y))) && //
-               noexcept(*__y = ranges::iter_move(__x)) && //
-               noexcept(*std::forward<_T1>(__x) = std::declval<iter_value_t<_T2>>()))
-    {
+      requires(!__unqualified_iter_swap<_T1, _T2> &&   //
+               !__readable_swappable<_T1, _T2>) &&     //
+              indirectly_movable_storable<_T1, _T2> && //
+              indirectly_movable_storable<_T2, _T1>
+    _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_T1&& __x, _T2&& __y) const
+        noexcept(noexcept(iter_value_t<_T2>(ranges::iter_move(__y))) && //
+                 noexcept(*__y = ranges::iter_move(__x)) &&             //
+                 noexcept(*std::forward<_T1>(__x) = std::declval<iter_value_t<_T2>>())) {
       iter_value_t<_T2> __old(ranges::iter_move(__y));
       *__y = ranges::iter_move(__x);
       *std::forward<_T1>(__x) = std::move(__old);
diff --git a/libcxx/include/__iterator/ostream_iterator.h b/libcxx/include/__iterator/ostream_iterator.h
index 381f75832f..d3cc7bdf04 100644
--- a/libcxx/include/__iterator/ostream_iterator.h
+++ b/libcxx/include/__iterator/ostream_iterator.h
@@ -50,16 +50,17 @@ private:
     ostream_type* __out_stream_;
     const char_type* __delim_;
 public:
-    _LIBCPP_HIDE_FROM_ABI ostream_iterator(ostream_type& __s) _NOEXCEPT
-        : __out_stream_(std::addressof(__s)), __delim_(nullptr) {}
-    _LIBCPP_HIDE_FROM_ABI ostream_iterator(ostream_type& __s, const _CharT* __delimiter) _NOEXCEPT
-        : __out_stream_(std::addressof(__s)), __delim_(__delimiter) {}
-    _LIBCPP_HIDE_FROM_ABI ostream_iterator& operator=(const _Tp& __value)
-        {
-            *__out_stream_ << __value;
-            if (__delim_)
-                *__out_stream_ << __delim_;
-            return *this;
+  _LIBCPP_HIDE_FROM_ABI ostream_iterator(ostream_type& __s) _NOEXCEPT
+      : __out_stream_(std::addressof(__s)),
+        __delim_(nullptr) {}
+  _LIBCPP_HIDE_FROM_ABI ostream_iterator(ostream_type& __s, const _CharT* __delimiter) _NOEXCEPT
+      : __out_stream_(std::addressof(__s)),
+        __delim_(__delimiter) {}
+  _LIBCPP_HIDE_FROM_ABI ostream_iterator& operator=(const _Tp& __value) {
+    *__out_stream_ << __value;
+    if (__delim_)
+      *__out_stream_ << __delim_;
+    return *this;
         }
 
     _LIBCPP_HIDE_FROM_ABI ostream_iterator& operator*()     {return *this;}
diff --git a/libcxx/include/__iterator/reverse_access.h b/libcxx/include/__iterator/reverse_access.h
index 5e01f667e1..5745313ce2 100644
--- a/libcxx/include/__iterator/reverse_access.h
+++ b/libcxx/include/__iterator/reverse_access.h
@@ -80,17 +80,13 @@ auto rend(const _Cp& __c) -> decltype(__c.rend())
 }
 
 template <class _Cp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
-auto crbegin(const _Cp& __c) -> decltype(std::rbegin(__c))
-{
-    return std::rbegin(__c);
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto crbegin(const _Cp& __c) -> decltype(std::rbegin(__c)) {
+  return std::rbegin(__c);
 }
 
 template <class _Cp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
-auto crend(const _Cp& __c) -> decltype(std::rend(__c))
-{
-    return std::rend(__c);
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto crend(const _Cp& __c) -> decltype(std::rend(__c)) {
+  return std::rend(__c);
 }
 
 #endif // _LIBCPP_STD_VER >= 14
diff --git a/libcxx/include/__iterator/wrap_iter.h b/libcxx/include/__iterator/wrap_iter.h
index d028d7b3c3..0b5a1609d1 100644
--- a/libcxx/include/__iterator/wrap_iter.h
+++ b/libcxx/include/__iterator/wrap_iter.h
@@ -56,7 +56,7 @@ public:
     }
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT
     {
-        return std::__to_address(__i_);
+      return std::__to_address(__i_);
     }
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator++() _NOEXCEPT
     {
@@ -222,7 +222,7 @@ struct _LIBCPP_TEMPLATE_VIS pointer_traits<__wrap_iter<_It> >
 
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
     static element_type *to_address(pointer __w) _NOEXCEPT {
-        return std::__to_address(__w.base());
+      return std::__to_address(__w.base());
     }
 };
 
diff --git a/libcxx/include/__memory/allocation_guard.h b/libcxx/include/__memory/allocation_guard.h
index c36ce15397..568471e569 100644
--- a/libcxx/include/__memory/allocation_guard.h
+++ b/libcxx/include/__memory/allocation_guard.h
@@ -49,13 +49,12 @@ struct __allocation_guard {
     using _Pointer = typename allocator_traits<_Alloc>::pointer;
     using _Size = 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)
-        : __alloc_(std::move(__alloc))
-        , __n_(__n)
-        , __ptr_(allocator_traits<_Alloc>::allocate(__alloc_, __n_)) // initialization order is important
-    { }
+    template <class _AllocT> // we perform the allocator conversion inside the constructor
+    _LIBCPP_HIDE_FROM_ABI explicit __allocation_guard(_AllocT __alloc, _Size __n)
+        : __alloc_(std::move(__alloc)),
+          __n_(__n),
+          __ptr_(allocator_traits<_Alloc>::allocate(__alloc_, __n_)) // initialization order is important
+    {}
 
     _LIBCPP_HIDE_FROM_ABI
     ~__allocation_guard() _NOEXCEPT {
diff --git a/libcxx/include/__memory/allocator.h b/libcxx/include/__memory/allocator.h
index 7568da7997..486f25e893 100644
--- a/libcxx/include/__memory/allocator.h
+++ b/libcxx/include/__memory/allocator.h
@@ -111,7 +111,7 @@ public:
         if (__libcpp_is_constant_evaluated()) {
             return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
         } else {
-            return static_cast<_Tp*>(std::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));
+          return static_cast<_Tp*>(std::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));
         }
     }
 
@@ -127,7 +127,7 @@ public:
         if (__libcpp_is_constant_evaluated()) {
             ::operator delete(__p);
         } else {
-            std::__libcpp_deallocate((void*)__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
+          std::__libcpp_deallocate((void*)__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
         }
     }
 
@@ -145,11 +145,11 @@ public:
 
     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
     pointer address(reference __x) const _NOEXCEPT {
-        return std::addressof(__x);
+      return std::addressof(__x);
     }
     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
     const_pointer address(const_reference __x) const _NOEXCEPT {
-        return std::addressof(__x);
+      return std::addressof(__x);
     }
 
     _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX17
@@ -164,7 +164,7 @@ public:
     template <class _Up, class... _Args>
     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
     void construct(_Up* __p, _Args&&... __args) {
-        ::new ((void*)__p) _Up(std::forward<_Args>(__args)...);
+      ::new ((void*)__p) _Up(std::forward<_Args>(__args)...);
     }
 
     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
@@ -199,7 +199,7 @@ public:
         if (__libcpp_is_constant_evaluated()) {
             return static_cast<const _Tp*>(::operator new(__n * sizeof(_Tp)));
         } else {
-            return static_cast<const _Tp*>(std::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));
+          return static_cast<const _Tp*>(std::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));
         }
     }
 
@@ -215,7 +215,7 @@ public:
         if (__libcpp_is_constant_evaluated()) {
             ::operator delete(const_cast<_Tp*>(__p));
         } else {
-            std::__libcpp_deallocate((void*) const_cast<_Tp *>(__p), __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
+          std::__libcpp_deallocate((void*)const_cast<_Tp*>(__p), __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
         }
     }
 
@@ -233,7 +233,7 @@ public:
 
     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
     const_pointer address(const_reference __x) const _NOEXCEPT {
-        return std::addressof(__x);
+      return std::addressof(__x);
     }
 
     _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX17
@@ -248,7 +248,7 @@ public:
     template <class _Up, class... _Args>
     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
     void construct(_Up* __p, _Args&&... __args) {
-        ::new ((void*)__p) _Up(std::forward<_Args>(__args)...);
+      ::new ((void*)__p) _Up(std::forward<_Args>(__args)...);
     }
 
     _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI
diff --git a/libcxx/include/__memory/allocator_arg_t.h b/libcxx/include/__memory/allocator_arg_t.h
index 09a015acdf..3a8357bc90 100644
--- a/libcxx/include/__memory/allocator_arg_t.h
+++ b/libcxx/include/__memory/allocator_arg_t.h
@@ -54,7 +54,7 @@ template <class _Tp, class _Allocator, class... _Args>
 inline _LIBCPP_HIDE_FROM_ABI
 void __user_alloc_construct_impl (integral_constant<int, 0>, _Tp *__storage, const _Allocator &, _Args &&... __args )
 {
-    new (__storage) _Tp (std::forward<_Args>(__args)...);
+  new (__storage) _Tp(std::forward<_Args>(__args)...);
 }
 
 // FIXME: This should have a version which takes a non-const alloc.
@@ -62,7 +62,7 @@ template <class _Tp, class _Allocator, class... _Args>
 inline _LIBCPP_HIDE_FROM_ABI
 void __user_alloc_construct_impl (integral_constant<int, 1>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
 {
-    new (__storage) _Tp (allocator_arg, __a, std::forward<_Args>(__args)...);
+  new (__storage) _Tp(allocator_arg, __a, std::forward<_Args>(__args)...);
 }
 
 // FIXME: This should have a version which takes a non-const alloc.
@@ -70,7 +70,7 @@ template <class _Tp, class _Allocator, class... _Args>
 inline _LIBCPP_HIDE_FROM_ABI
 void __user_alloc_construct_impl (integral_constant<int, 2>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
 {
-    new (__storage) _Tp (std::forward<_Args>(__args)..., __a);
+  new (__storage) _Tp(std::forward<_Args>(__args)..., __a);
 }
 
 #endif // _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/__memory/builtin_new_allocator.h b/libcxx/include/__memory/builtin_new_allocator.h
index 348712c6d8..15927af38a 100644
--- a/libcxx/include/__memory/builtin_new_allocator.h
+++ b/libcxx/include/__memory/builtin_new_allocator.h
@@ -32,7 +32,7 @@ struct __builtin_new_allocator {
         : __size_(__size), __align_(__align) {}
 
     _LIBCPP_HIDE_FROM_ABI void operator()(void* __p) const _NOEXCEPT {
-        std::__libcpp_deallocate(__p, __size_, __align_);
+      std::__libcpp_deallocate(__p, __size_, __align_);
     }
 
    private:
@@ -43,13 +43,12 @@ struct __builtin_new_allocator {
   typedef unique_ptr<void, __builtin_new_deleter> __holder_t;
 
   _LIBCPP_HIDE_FROM_ABI static __holder_t __allocate_bytes(size_t __s, size_t __align) {
-      return __holder_t(std::__libcpp_allocate(__s, __align),
-                     __builtin_new_deleter(__s, __align));
+    return __holder_t(std::__libcpp_allocate(__s, __align), __builtin_new_deleter(__s, __align));
   }
 
   _LIBCPP_HIDE_FROM_ABI static void __deallocate_bytes(void* __p, size_t __s,
                                  size_t __align) _NOEXCEPT {
-      std::__libcpp_deallocate(__p, __s, __align);
+    std::__libcpp_deallocate(__p, __s, __align);
   }
 
   template <class _Tp>
diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h
index 7fcf3bf061..84129dc5be 100644
--- a/libcxx/include/__memory/pointer_traits.h
+++ b/libcxx/include/__memory/pointer_traits.h
@@ -154,9 +154,10 @@ struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*>
 private:
     struct __nat {};
 public:
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
-    static pointer pointer_to(__conditional_t<is_void<element_type>::value, __nat, element_type>& __r) _NOEXCEPT
-        {return std::addressof(__r);}
+  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static pointer
+  pointer_to(__conditional_t<is_void<element_type>::value, __nat, element_type>& __r) _NOEXCEPT {
+    return std::addressof(__r);
+  }
 };
 
 #ifndef _LIBCPP_CXX03_LANG
@@ -212,11 +213,11 @@ __to_address(const _Pointer& __p) _NOEXCEPT {
 
 template <class _Pointer, class>
 struct __to_address_helper {
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
-    static decltype(std::__to_address(std::declval<const _Pointer&>().operator->()))
-    __call(const _Pointer& __p) _NOEXCEPT {
-        return std::__to_address(__p.operator->());
-    }
+  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static decltype(std::__to_address(
+      std::declval<const _Pointer&>().operator->()))
+  __call(const _Pointer& __p) _NOEXCEPT {
+    return std::__to_address(__p.operator->());
+  }
 };
 
 template <class _Pointer>
@@ -232,13 +233,13 @@ struct __to_address_helper<_Pointer, decltype((void)pointer_traits<_Pointer>::to
 template <class _Tp>
 inline _LIBCPP_HIDE_FROM_ABI constexpr
 auto to_address(_Tp *__p) noexcept {
-    return std::__to_address(__p);
+  return std::__to_address(__p);
 }
 
 template <class _Pointer>
 inline _LIBCPP_HIDE_FROM_ABI constexpr
 auto to_address(const _Pointer& __p) noexcept -> decltype(std::__to_address(__p)) {
-    return std::__to_address(__p);
+  return std::__to_address(__p);
 }
 #endif
 
diff --git a/libcxx/include/__memory/ranges_uninitialized_algorithms.h b/libcxx/include/__memory/ranges_uninitialized_algorithms.h
index 513fcf70f1..db4ed69186 100644
--- a/libcxx/include/__memory/ranges_uninitialized_algorithms.h
+++ b/libcxx/include/__memory/ranges_uninitialized_algorithms.h
@@ -47,8 +47,7 @@ struct __fn {
     requires default_initializable<iter_value_t<_ForwardIterator>>
   _LIBCPP_HIDE_FROM_ABI _ForwardIterator operator()(_ForwardIterator __first, _Sentinel __last) const {
     using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
-    return std::__uninitialized_default_construct<_ValueType>(
-        std::move(__first), std::move(__last));
+    return std::__uninitialized_default_construct<_ValueType>(std::move(__first), std::move(__last));
   }
 
   template <__nothrow_forward_range _ForwardRange>
@@ -94,8 +93,7 @@ struct __fn {
     requires default_initializable<iter_value_t<_ForwardIterator>>
   _LIBCPP_HIDE_FROM_ABI _ForwardIterator operator()(_ForwardIterator __first, _Sentinel __last) const {
     using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
-    return std::__uninitialized_value_construct<_ValueType>(
-        std::move(__first), std::move(__last));
+    return std::__uninitialized_value_construct<_ValueType>(std::move(__first), std::move(__last));
   }
 
   template <__nothrow_forward_range _ForwardRange>
diff --git a/libcxx/include/__memory/raw_storage_iterator.h b/libcxx/include/__memory/raw_storage_iterator.h
index 7aa75dca35..01cd578b97 100644
--- a/libcxx/include/__memory/raw_storage_iterator.h
+++ b/libcxx/include/__memory/raw_storage_iterator.h
@@ -49,11 +49,15 @@ public:
 
     _LIBCPP_HIDE_FROM_ABI explicit raw_storage_iterator(_OutputIterator __x) : __x_(__x) {}
     _LIBCPP_HIDE_FROM_ABI raw_storage_iterator& operator*() {return *this;}
-    _LIBCPP_HIDE_FROM_ABI raw_storage_iterator& operator=(const _Tp& __element)
-        {::new ((void*)std::addressof(*__x_)) _Tp(__element); return *this;}
+    _LIBCPP_HIDE_FROM_ABI raw_storage_iterator& operator=(const _Tp& __element) {
+      ::new ((void*)std::addressof(*__x_)) _Tp(__element);
+      return *this;
+    }
 #if _LIBCPP_STD_VER >= 14
-    _LIBCPP_HIDE_FROM_ABI raw_storage_iterator& operator=(_Tp&& __element)
-        {::new ((void*)std::addressof(*__x_)) _Tp(std::move(__element)); return *this;}
+    _LIBCPP_HIDE_FROM_ABI raw_storage_iterator& operator=(_Tp&& __element) {
+      ::new ((void*)std::addressof(*__x_)) _Tp(std::move(__element));
+      return *this;
+    }
 #endif
     _LIBCPP_HIDE_FROM_ABI raw_storage_iterator& operator++() {++__x_; return *this;}
     _LIBCPP_HIDE_FROM_ABI raw_storage_iterator  operator++(int)
diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h
index 84db7998a1..cc78b7fb99 100644
--- a/libcxx/include/__memory/shared_ptr.h
+++ b/libcxx/include/__memory/shared_ptr.h
@@ -231,9 +231,8 @@ class __shared_ptr_pointer
 {
     __compressed_pair<__compressed_pair<_Tp, _Dp>, _Alloc> __data_;
 public:
-    _LIBCPP_HIDE_FROM_ABI
-    __shared_ptr_pointer(_Tp __p, _Dp __d, _Alloc __a)
-        :  __data_(__compressed_pair<_Tp, _Dp>(__p, std::move(__d)), std::move(__a)) {}
+  _LIBCPP_HIDE_FROM_ABI __shared_ptr_pointer(_Tp __p, _Dp __d, _Alloc __a)
+      : __data_(__compressed_pair<_Tp, _Dp>(__p, std::move(__d)), std::move(__a)) {}
 
 #ifndef _LIBCPP_HAS_NO_RTTI
     _LIBCPP_HIDE_FROM_ABI_VIRTUAL const void* __get_deleter(const type_info&) const _NOEXCEPT override;
@@ -250,7 +249,7 @@ template <class _Tp, class _Dp, class _Alloc>
 const void*
 __shared_ptr_pointer<_Tp, _Dp, _Alloc>::__get_deleter(const type_info& __t) const _NOEXCEPT
 {
-    return __t == typeid(_Dp) ? std::addressof(__data_.first().second()) : nullptr;
+  return __t == typeid(_Dp) ? std::addressof(__data_.first().second()) : nullptr;
 }
 
 #endif // _LIBCPP_HAS_NO_RTTI
@@ -285,24 +284,23 @@ template <class _Tp, class _Alloc>
 struct __shared_ptr_emplace
     : __shared_weak_count
 {
-    template <class... _Args, class _Allocator = _Alloc, __enable_if_t<is_same<typename _Allocator::value_type, __for_overwrite_tag>::value, int> = 0>
-    _LIBCPP_HIDE_FROM_ABI
-    explicit __shared_ptr_emplace(_Alloc __a, _Args&& ...)
-        : __storage_(std::move(__a))
-    {
-        static_assert(sizeof...(_Args) == 0, "No argument should be provided to the control block when using _for_overwrite");
-        ::new ((void*)__get_elem()) _Tp;
-    }
-
-    template <class... _Args, class _Allocator = _Alloc, __enable_if_t<!is_same<typename _Allocator::value_type, __for_overwrite_tag>::value, int> = 0>
-    _LIBCPP_HIDE_FROM_ABI
-    explicit __shared_ptr_emplace(_Alloc __a, _Args&& ...__args)
-        : __storage_(std::move(__a))
-    {
-        using _TpAlloc = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
-        _TpAlloc __tmp(*__get_alloc());
-        allocator_traits<_TpAlloc>::construct(__tmp, __get_elem(), std::forward<_Args>(__args)...);
-    }
+  template <class... _Args,
+            class _Allocator                                                                         = _Alloc,
+            __enable_if_t<is_same<typename _Allocator::value_type, __for_overwrite_tag>::value, int> = 0>
+  _LIBCPP_HIDE_FROM_ABI explicit __shared_ptr_emplace(_Alloc __a, _Args&&...) : __storage_(std::move(__a)) {
+    static_assert(
+        sizeof...(_Args) == 0, "No argument should be provided to the control block when using _for_overwrite");
+    ::new ((void*)__get_elem()) _Tp;
+  }
+
+  template <class... _Args,
+            class _Allocator                                                                          = _Alloc,
+            __enable_if_t<!is_same<typename _Allocator::value_type, __for_overwrite_tag>::value, int> = 0>
+  _LIBCPP_HIDE_FROM_ABI explicit __shared_ptr_emplace(_Alloc __a, _Args&&... __args) : __storage_(std::move(__a)) {
+    using _TpAlloc = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
+    _TpAlloc __tmp(*__get_alloc());
+    allocator_traits<_TpAlloc>::construct(__tmp, __get_elem(), std::forward<_Args>(__args)...);
+  }
 
     _LIBCPP_HIDE_FROM_ABI
     _Alloc* __get_alloc() _NOEXCEPT { return __storage_.__get_alloc(); }
@@ -348,9 +346,7 @@ private:
     struct _ALIGNAS_TYPE(_CompressedPair) _Storage {
         char __blob_[sizeof(_CompressedPair)];
 
-        _LIBCPP_HIDE_FROM_ABI explicit _Storage(_Alloc&& __a) {
-            ::new ((void*)__get_alloc()) _Alloc(std::move(__a));
-        }
+        _LIBCPP_HIDE_FROM_ABI explicit _Storage(_Alloc&& __a) { ::new ((void*)__get_alloc()) _Alloc(std::move(__a)); }
         _LIBCPP_HIDE_FROM_ABI ~_Storage() {
             __get_alloc()->~_Alloc();
         }
@@ -793,16 +789,16 @@ public:
     _LIBCPP_HIDE_FROM_ABI
     shared_ptr<_Tp>& operator=(shared_ptr&& __r) _NOEXCEPT
     {
-        shared_ptr(std::move(__r)).swap(*this);
-        return *this;
+      shared_ptr(std::move(__r)).swap(*this);
+      return *this;
     }
 
     template<class _Yp, class = __enable_if_t<__compatible_with<_Yp, _Tp>::value> >
     _LIBCPP_HIDE_FROM_ABI
     shared_ptr<_Tp>& operator=(shared_ptr<_Yp>&& __r)
     {
-        shared_ptr(std::move(__r)).swap(*this);
-        return *this;
+      shared_ptr(std::move(__r)).swap(*this);
+      return *this;
     }
 
 #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
@@ -813,8 +809,8 @@ public:
     _LIBCPP_HIDE_FROM_ABI
     shared_ptr<_Tp>& operator=(auto_ptr<_Yp>&& __r)
     {
-        shared_ptr(std::move(__r)).swap(*this);
-        return *this;
+      shared_ptr(std::move(__r)).swap(*this);
+      return *this;
     }
 #endif
 
@@ -825,15 +821,15 @@ public:
     _LIBCPP_HIDE_FROM_ABI
     shared_ptr<_Tp>& operator=(unique_ptr<_Yp, _Dp>&& __r)
     {
-        shared_ptr(std::move(__r)).swap(*this);
-        return *this;
+      shared_ptr(std::move(__r)).swap(*this);
+      return *this;
     }
 
     _LIBCPP_HIDE_FROM_ABI
     void swap(shared_ptr& __r) _NOEXCEPT
     {
-        std::swap(__ptr_, __r.__ptr_);
-        std::swap(__cntrl_, __r.__cntrl_);
+      std::swap(__ptr_, __r.__ptr_);
+      std::swap(__cntrl_, __r.__cntrl_);
     }
 
     _LIBCPP_HIDE_FROM_ABI
@@ -1024,14 +1020,15 @@ shared_ptr<_Tp> allocate_shared(const _Alloc& __a, _Args&& ...__args)
     __allocation_guard<_ControlBlockAllocator> __guard(__a, 1);
     ::new ((void*)std::addressof(*__guard.__get())) _ControlBlock(__a, std::forward<_Args>(__args)...);
     auto __control_block = __guard.__release_ptr();
-    return shared_ptr<_Tp>::__create_with_control_block((*__control_block).__get_elem(), std::addressof(*__control_block));
+    return shared_ptr<_Tp>::__create_with_control_block(
+        (*__control_block).__get_elem(), std::addressof(*__control_block));
 }
 
 template<class _Tp, class ..._Args, class = __enable_if_t<!is_array<_Tp>::value> >
 _LIBCPP_HIDE_FROM_ABI
 shared_ptr<_Tp> make_shared(_Args&& ...__args)
 {
-    return std::allocate_shared<_Tp>(allocator<_Tp>(), std::forward<_Args>(__args)...);
+  return std::allocate_shared<_Tp>(allocator<_Tp>(), std::forward<_Args>(__args)...);
 }
 
 #if _LIBCPP_STD_VER >= 20
@@ -1789,8 +1786,8 @@ inline
 weak_ptr<_Tp>&
 weak_ptr<_Tp>::operator=(weak_ptr&& __r) _NOEXCEPT
 {
-    weak_ptr(std::move(__r)).swap(*this);
-    return *this;
+  weak_ptr(std::move(__r)).swap(*this);
+  return *this;
 }
 
 template<class _Tp>
@@ -1799,8 +1796,8 @@ inline
 weak_ptr<_Tp>&
 weak_ptr<_Tp>::operator=(weak_ptr<_Yp>&& __r) _NOEXCEPT
 {
-    weak_ptr(std::move(__r)).swap(*this);
-    return *this;
+  weak_ptr(std::move(__r)).swap(*this);
+  return *this;
 }
 
 template<class _Tp>
@@ -1818,8 +1815,8 @@ inline
 void
 weak_ptr<_Tp>::swap(weak_ptr& __r) _NOEXCEPT
 {
-    std::swap(__ptr_, __r.__ptr_);
-    std::swap(__cntrl_, __r.__cntrl_);
+  std::swap(__ptr_, __r.__ptr_);
+  std::swap(__cntrl_, __r.__cntrl_);
 }
 
 template<class _Tp>
@@ -2060,10 +2057,10 @@ atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, share
     __m.lock();
     if (__p->__owner_equivalent(*__v))
     {
-        std::swap(__temp, *__p);
-        *__p = __w;
-        __m.unlock();
-        return true;
+      std::swap(__temp, *__p);
+      *__p = __w;
+      __m.unlock();
+      return true;
     }
     std::swap(__temp, *__v);
     *__v = *__p;
diff --git a/libcxx/include/__memory/temporary_buffer.h b/libcxx/include/__memory/temporary_buffer.h
index 28ef5d028b..d2291b7e5e 100644
--- a/libcxx/include/__memory/temporary_buffer.h
+++ b/libcxx/include/__memory/temporary_buffer.h
@@ -76,8 +76,10 @@ void return_temporary_buffer(_Tp* __p) _NOEXCEPT
 struct __return_temporary_buffer
 {
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
-    template <class _Tp>
-    _LIBCPP_HIDE_FROM_ABI void operator()(_Tp* __p) const {std::return_temporary_buffer(__p);}
+template <class _Tp>
+_LIBCPP_HIDE_FROM_ABI void operator()(_Tp* __p) const {
+  std::return_temporary_buffer(__p);
+}
 _LIBCPP_SUPPRESS_DEPRECATED_POP
 };
 
diff --git a/libcxx/include/__memory/uninitialized_algorithms.h b/libcxx/include/__memory/uninitialized_algorithms.h
index b0eb700159..c4a314dd24 100644
--- a/libcxx/include/__memory/uninitialized_algorithms.h
+++ b/libcxx/include/__memory/uninitialized_algorithms.h
@@ -124,13 +124,13 @@ _ForwardIterator __uninitialized_fill(_ForwardIterator __first, _Sentinel __last
     {
 #endif
         for (; __idx != __last; ++__idx)
-            ::new (std::__voidify(*__idx)) _ValueType(__x);
+          ::new (std::__voidify(*__idx)) _ValueType(__x);
 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
     }
     catch (...)
     {
-        std::__destroy(__first, __idx);
-        throw;
+      std::__destroy(__first, __idx);
+      throw;
     }
 #endif
 
@@ -157,13 +157,13 @@ _ForwardIterator __uninitialized_fill_n(_ForwardIterator __first, _Size __n, con
     {
 #endif
         for (; __n > 0; ++__idx, (void) --__n)
-            ::new (std::__voidify(*__idx)) _ValueType(__x);
+          ::new (std::__voidify(*__idx)) _ValueType(__x);
 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
     }
     catch (...)
     {
-        std::__destroy(__first, __idx);
-        throw;
+      std::__destroy(__first, __idx);
+      throw;
     }
 #endif
 
@@ -190,11 +190,11 @@ _ForwardIterator __uninitialized_default_construct(_ForwardIterator __first, _Se
     try {
 #endif
     for (; __idx != __last; ++__idx)
-        ::new (std::__voidify(*__idx)) _ValueType;
+      ::new (std::__voidify(*__idx)) _ValueType;
 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
     } catch (...) {
-        std::__destroy(__first, __idx);
-        throw;
+      std::__destroy(__first, __idx);
+      throw;
     }
 #endif
 
@@ -205,8 +205,7 @@ template <class _ForwardIterator>
 inline _LIBCPP_HIDE_FROM_ABI
 void uninitialized_default_construct(_ForwardIterator __first, _ForwardIterator __last) {
     using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
-    (void)std::__uninitialized_default_construct<_ValueType>(
-        std::move(__first), std::move(__last));
+    (void)std::__uninitialized_default_construct<_ValueType>(std::move(__first), std::move(__last));
 }
 
 // uninitialized_default_construct_n
@@ -219,11 +218,11 @@ _ForwardIterator __uninitialized_default_construct_n(_ForwardIterator __first, _
     try {
 #endif
     for (; __n > 0; ++__idx, (void) --__n)
-        ::new (std::__voidify(*__idx)) _ValueType;
+      ::new (std::__voidify(*__idx)) _ValueType;
 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
     } catch (...) {
-        std::__destroy(__first, __idx);
-        throw;
+      std::__destroy(__first, __idx);
+      throw;
     }
 #endif
 
@@ -247,11 +246,11 @@ _ForwardIterator __uninitialized_value_construct(_ForwardIterator __first, _Sent
     try {
 #endif
     for (; __idx != __last; ++__idx)
-        ::new (std::__voidify(*__idx)) _ValueType();
+      ::new (std::__voidify(*__idx)) _ValueType();
 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
     } catch (...) {
-        std::__destroy(__first, __idx);
-        throw;
+      std::__destroy(__first, __idx);
+      throw;
     }
 #endif
 
@@ -262,8 +261,7 @@ template <class _ForwardIterator>
 inline _LIBCPP_HIDE_FROM_ABI
 void uninitialized_value_construct(_ForwardIterator __first, _ForwardIterator __last) {
     using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
-    (void)std::__uninitialized_value_construct<_ValueType>(
-        std::move(__first), std::move(__last));
+    (void)std::__uninitialized_value_construct<_ValueType>(std::move(__first), std::move(__last));
 }
 
 // uninitialized_value_construct_n
@@ -276,11 +274,11 @@ _ForwardIterator __uninitialized_value_construct_n(_ForwardIterator __first, _Si
     try {
 #endif
     for (; __n > 0; ++__idx, (void) --__n)
-        ::new (std::__voidify(*__idx)) _ValueType();
+      ::new (std::__voidify(*__idx)) _ValueType();
 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
     } catch (...) {
-        std::__destroy(__first, __idx);
-        throw;
+      std::__destroy(__first, __idx);
+      throw;
     }
 #endif
 
diff --git a/libcxx/include/__memory/unique_ptr.h b/libcxx/include/__memory/unique_ptr.h
index 32e4942a83..0e6ea5ef23 100644
--- a/libcxx/include/__memory/unique_ptr.h
+++ b/libcxx/include/__memory/unique_ptr.h
@@ -199,8 +199,8 @@ public:
       : __ptr_(__p, __d) {}
 
   template <bool _Dummy = true, class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> > >
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
-  unique_ptr(pointer __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT : __ptr_(__p, std::move(__d)) {
+  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr(pointer __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
+      : __ptr_(__p, std::move(__d)) {
     static_assert(!is_reference<deleter_type>::value,
                   "rvalue deleter bound to reference");
   }
diff --git a/libcxx/include/__numeric/accumulate.h b/libcxx/include/__numeric/accumulate.h
index 1ab6c4b616..771c1ac7ea 100644
--- a/libcxx/include/__numeric/accumulate.h
+++ b/libcxx/include/__numeric/accumulate.h
@@ -29,7 +29,7 @@ accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
 {
     for (; __first != __last; ++__first)
 #if _LIBCPP_STD_VER >= 20
-        __init = std::move(__init) + *__first;
+      __init = std::move(__init) + *__first;
 #else
         __init = __init + *__first;
 #endif
@@ -43,7 +43,7 @@ accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOpe
 {
     for (; __first != __last; ++__first)
 #if _LIBCPP_STD_VER >= 20
-        __init = __binary_op(std::move(__init), *__first);
+      __init = __binary_op(std::move(__init), *__first);
 #else
         __init = __binary_op(__init, *__first);
 #endif
diff --git a/libcxx/include/__numeric/gcd_lcm.h b/libcxx/include/__numeric/gcd_lcm.h
index 693be704af..32b29b0e5a 100644
--- a/libcxx/include/__numeric/gcd_lcm.h
+++ b/libcxx/include/__numeric/gcd_lcm.h
@@ -68,9 +68,8 @@ gcd(_Tp __m, _Up __n)
     static_assert((!is_same<__remove_cv_t<_Up>, bool>::value), "Second argument to gcd cannot be bool" );
     using _Rp = common_type_t<_Tp,_Up>;
     using _Wp = make_unsigned_t<_Rp>;
-    return static_cast<_Rp>(std::__gcd(
-        static_cast<_Wp>(__ct_abs<_Rp, _Tp>()(__m)),
-        static_cast<_Wp>(__ct_abs<_Rp, _Up>()(__n))));
+    return static_cast<_Rp>(
+        std::__gcd(static_cast<_Wp>(__ct_abs<_Rp, _Tp>()(__m)), static_cast<_Wp>(__ct_abs<_Rp, _Up>()(__n))));
 }
 
 template<class _Tp, class _Up>
diff --git a/libcxx/include/__numeric/inner_product.h b/libcxx/include/__numeric/inner_product.h
index 48f2ea3489..cdce3d8691 100644
--- a/libcxx/include/__numeric/inner_product.h
+++ b/libcxx/include/__numeric/inner_product.h
@@ -29,7 +29,7 @@ inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2
 {
     for (; __first1 != __last1; ++__first1, (void) ++__first2)
 #if _LIBCPP_STD_VER >= 20
-        __init = std::move(__init) + *__first1 * *__first2;
+      __init = std::move(__init) + *__first1 * *__first2;
 #else
         __init = __init + *__first1 * *__first2;
 #endif
@@ -44,7 +44,7 @@ inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2
 {
     for (; __first1 != __last1; ++__first1, (void) ++__first2)
 #if _LIBCPP_STD_VER >= 20
-        __init = __binary_op1(std::move(__init), __binary_op2(*__first1, *__first2));
+      __init = __binary_op1(std::move(__init), __binary_op2(*__first1, *__first2));
 #else
         __init = __binary_op1(__init, __binary_op2(*__first1, *__first2));
 #endif
diff --git a/libcxx/include/__numeric/midpoint.h b/libcxx/include/__numeric/midpoint.h
index c92e450767..334b012b8c 100644
--- a/libcxx/include/__numeric/midpoint.h
+++ b/libcxx/include/__numeric/midpoint.h
@@ -60,7 +60,7 @@ enable_if_t<is_pointer_v<_TPtr>
              && (sizeof(remove_pointer_t<_TPtr>) > 0), _TPtr>
 midpoint(_TPtr __a, _TPtr __b) noexcept
 {
-    return __a + std::midpoint(ptrdiff_t(0), __b - __a);
+  return __a + std::midpoint(ptrdiff_t(0), __b - __a);
 }
 
 
diff --git a/libcxx/include/__numeric/partial_sum.h b/libcxx/include/__numeric/partial_sum.h
index 49afcbb746..b11765cd47 100644
--- a/libcxx/include/__numeric/partial_sum.h
+++ b/libcxx/include/__numeric/partial_sum.h
@@ -35,7 +35,7 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res
         for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result)
         {
 #if _LIBCPP_STD_VER >= 20
-            __t = std::move(__t) + *__first;
+          __t = std::move(__t) + *__first;
 #else
             __t = __t + *__first;
 #endif
@@ -58,7 +58,7 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res
         for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result)
         {
 #if _LIBCPP_STD_VER >= 20
-            __t = __binary_op(std::move(__t), *__first);
+          __t = __binary_op(std::move(__t), *__first);
 #else
             __t = __binary_op(__t, *__first);
 #endif
diff --git a/libcxx/include/__numeric/transform_inclusive_scan.h b/libcxx/include/__numeric/transform_inclusive_scan.h
index e1b818ca58..da4f07bb6f 100644
--- a/libcxx/include/__numeric/transform_inclusive_scan.h
+++ b/libcxx/include/__numeric/transform_inclusive_scan.h
@@ -45,7 +45,7 @@ transform_inclusive_scan(_InputIterator __first, _InputIterator __last,
         typename iterator_traits<_InputIterator>::value_type __init = __u(*__first);
         *__result++ = __init;
         if (++__first != __last)
-            return std::transform_inclusive_scan(__first, __last, __result, __b, __u, __init);
+          return std::transform_inclusive_scan(__first, __last, __result, __b, __u, __init);
     }
 
     return __result;
diff --git a/libcxx/include/__numeric/transform_reduce.h b/libcxx/include/__numeric/transform_reduce.h
index 04d02b6c6a..9410dd380c 100644
--- a/libcxx/include/__numeric/transform_reduce.h
+++ b/libcxx/include/__numeric/transform_reduce.h
@@ -44,8 +44,7 @@ template <class _InputIterator1, class _InputIterator2, class _Tp>
 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp transform_reduce(_InputIterator1 __first1,
                                                                              _InputIterator1 __last1,
                                                                              _InputIterator2 __first2, _Tp __init) {
-  return std::transform_reduce(__first1, __last1, __first2, std::move(__init), std::plus<>(),
-                                 std::multiplies<>());
+  return std::transform_reduce(__first1, __last1, __first2, std::move(__init), std::plus<>(), std::multiplies<>());
 }
 #endif
 
diff --git a/libcxx/include/__random/binomial_distribution.h b/libcxx/include/__random/binomial_distribution.h
index 03661b19be..3e34b4cc6c 100644
--- a/libcxx/include/__random/binomial_distribution.h
+++ b/libcxx/include/__random/binomial_distribution.h
@@ -134,10 +134,9 @@ binomial_distribution<_IntType>::param_type::param_type(result_type __t, double
     if (0 < __p_ && __p_ < 1)
     {
         __r0_ = static_cast<result_type>((__t_ + 1) * __p_);
-        __pr_ = std::exp(std::__libcpp_lgamma(__t_ + 1.) -
-                           std::__libcpp_lgamma(__r0_ + 1.) -
-                           std::__libcpp_lgamma(__t_ - __r0_ + 1.) + __r0_ * std::log(__p_) +
-                           (__t_ - __r0_) * std::log(1 - __p_));
+        __pr_ = std::exp(
+            std::__libcpp_lgamma(__t_ + 1.) - std::__libcpp_lgamma(__r0_ + 1.) -
+            std::__libcpp_lgamma(__t_ - __r0_ + 1.) + __r0_ * std::log(__p_) + (__t_ - __r0_) * std::log(1 - __p_));
         __odds_ratio_ = __p_ / (1 - __p_);
     }
 }
diff --git a/libcxx/include/__random/discard_block_engine.h b/libcxx/include/__random/discard_block_engine.h
index 8ce5a1cf2c..411b268993 100644
--- a/libcxx/include/__random/discard_block_engine.h
+++ b/libcxx/include/__random/discard_block_engine.h
@@ -66,9 +66,7 @@ public:
     explicit discard_block_engine(const _Engine& __e)
         : __e_(__e), __n_(0) {}
 #ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI
-    explicit discard_block_engine(_Engine&& __e)
-        : __e_(std::move(__e)), __n_(0) {}
+    _LIBCPP_HIDE_FROM_ABI explicit discard_block_engine(_Engine&& __e) : __e_(std::move(__e)), __n_(0) {}
 #endif // _LIBCPP_CXX03_LANG
     _LIBCPP_HIDE_FROM_ABI
     explicit discard_block_engine(result_type __sd) : __e_(__sd), __n_(0) {}
diff --git a/libcxx/include/__random/discrete_distribution.h b/libcxx/include/__random/discrete_distribution.h
index 9f0bc35914..23d5483a0b 100644
--- a/libcxx/include/__random/discrete_distribution.h
+++ b/libcxx/include/__random/discrete_distribution.h
@@ -180,12 +180,12 @@ discrete_distribution<_IntType>::param_type::__init()
     {
         if (__p_.size() > 1)
         {
-            double __s = std::accumulate(__p_.begin(), __p_.end(), 0.0);
-            for (vector<double>::iterator __i = __p_.begin(), __e = __p_.end(); __i < __e; ++__i)
-                *__i /= __s;
-            vector<double> __t(__p_.size() - 1);
-            std::partial_sum(__p_.begin(), __p_.end() - 1, __t.begin());
-            swap(__p_, __t);
+          double __s = std::accumulate(__p_.begin(), __p_.end(), 0.0);
+          for (vector<double>::iterator __i = __p_.begin(), __e = __p_.end(); __i < __e; ++__i)
+            *__i /= __s;
+          vector<double> __t(__p_.size() - 1);
+          std::partial_sum(__p_.begin(), __p_.end() - 1, __t.begin());
+          swap(__p_, __t);
         }
         else
         {
@@ -216,9 +216,7 @@ discrete_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p)
 {
     static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
     uniform_real_distribution<double> __gen;
-    return static_cast<_IntType>(
-           std::upper_bound(__p.__p_.begin(), __p.__p_.end(), __gen(__g)) -
-                                                              __p.__p_.begin());
+    return static_cast<_IntType>(std::upper_bound(__p.__p_.begin(), __p.__p_.end(), __gen(__g)) - __p.__p_.begin());
 }
 
 template <class _CharT, class _Traits, class _IT>
diff --git a/libcxx/include/__random/exponential_distribution.h b/libcxx/include/__random/exponential_distribution.h
index e5f0dad8cb..9841ee037e 100644
--- a/libcxx/include/__random/exponential_distribution.h
+++ b/libcxx/include/__random/exponential_distribution.h
@@ -112,13 +112,8 @@ _RealType
 exponential_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
     static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
-    return -std::log
-                  (
-                      result_type(1) -
-                      std::generate_canonical<result_type,
-                                       numeric_limits<result_type>::digits>(__g)
-                  )
-                  / __p.lambda();
+    return -std::log(result_type(1) - std::generate_canonical<result_type, numeric_limits<result_type>::digits>(__g)) /
+           __p.lambda();
 }
 
 template <class _CharT, class _Traits, class _RealType>
diff --git a/libcxx/include/__random/extreme_value_distribution.h b/libcxx/include/__random/extreme_value_distribution.h
index 4afc275981..7ce4b19919 100644
--- a/libcxx/include/__random/extreme_value_distribution.h
+++ b/libcxx/include/__random/extreme_value_distribution.h
@@ -119,8 +119,7 @@ _RealType
 extreme_value_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
     static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
-    return __p.a() - __p.b() *
-         std::log(-std::log(1-uniform_real_distribution<result_type>()(__g)));
+    return __p.a() - __p.b() * std::log(-std::log(1 - uniform_real_distribution<result_type>()(__g)));
 }
 
 template <class _CharT, class _Traits, class _RT>
diff --git a/libcxx/include/__random/gamma_distribution.h b/libcxx/include/__random/gamma_distribution.h
index e2f04ad517..e9012f04f0 100644
--- a/libcxx/include/__random/gamma_distribution.h
+++ b/libcxx/include/__random/gamma_distribution.h
@@ -137,16 +137,14 @@ gamma_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
             const result_type __w = __u * (1 - __u);
             if (__w != 0)
             {
-                const result_type __y = std::sqrt(__c / __w) *
-                                        (__u - result_type(0.5));
-                __x = __b + __y;
-                if (__x >= 0)
-                {
-                    const result_type __z = 64 * __w * __w * __w * __v * __v;
-                    if (__z <= 1 - 2 * __y * __y / __x)
-                        break;
-                    if (std::log(__z) <= 2 * (__b * std::log(__x / __b) - __y))
-                        break;
+              const result_type __y = std::sqrt(__c / __w) * (__u - result_type(0.5));
+              __x                   = __b + __y;
+              if (__x >= 0) {
+                const result_type __z = 64 * __w * __w * __w * __v * __v;
+                if (__z <= 1 - 2 * __y * __y / __x)
+                  break;
+                if (std::log(__z) <= 2 * (__b * std::log(__x / __b) - __y))
+                  break;
                 }
             }
         }
@@ -159,16 +157,16 @@ gamma_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
             const result_type __es = __egen(__g);
             if (__u <= 1 - __a)
             {
-                __x = std::pow(__u, 1 / __a);
-                if (__x <= __es)
-                    break;
+              __x = std::pow(__u, 1 / __a);
+              if (__x <= __es)
+                break;
             }
             else
             {
-                const result_type __e = -std::log((1-__u)/__a);
-                __x = std::pow(1 - __a + __a * __e, 1 / __a);
-                if (__x <= __e + __es)
-                    break;
+              const result_type __e = -std::log((1 - __u) / __a);
+              __x                   = std::pow(1 - __a + __a * __e, 1 / __a);
+              if (__x <= __e + __es)
+                break;
             }
         }
     }
diff --git a/libcxx/include/__random/independent_bits_engine.h b/libcxx/include/__random/independent_bits_engine.h
index b81fa49d3b..7fbe9a6fb5 100644
--- a/libcxx/include/__random/independent_bits_engine.h
+++ b/libcxx/include/__random/independent_bits_engine.h
@@ -99,9 +99,7 @@ public:
     explicit independent_bits_engine(const _Engine& __e)
         : __e_(__e) {}
 #ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI
-    explicit independent_bits_engine(_Engine&& __e)
-        : __e_(std::move(__e)) {}
+    _LIBCPP_HIDE_FROM_ABI explicit independent_bits_engine(_Engine&& __e) : __e_(std::move(__e)) {}
 #endif // _LIBCPP_CXX03_LANG
     _LIBCPP_HIDE_FROM_ABI
     explicit independent_bits_engine(result_type __sd) : __e_(__sd) {}
diff --git a/libcxx/include/__random/lognormal_distribution.h b/libcxx/include/__random/lognormal_distribution.h
index c30f9adf10..b5bc25e106 100644
--- a/libcxx/include/__random/lognormal_distribution.h
+++ b/libcxx/include/__random/lognormal_distribution.h
@@ -83,7 +83,7 @@ public:
     _LIBCPP_HIDE_FROM_ABI
     result_type operator()(_URNG& __g)
     {
-        return std::exp(__nd_(__g));
+      return std::exp(__nd_(__g));
     }
 
     template<class _URNG>
diff --git a/libcxx/include/__random/mersenne_twister_engine.h b/libcxx/include/__random/mersenne_twister_engine.h
index abc5ec255b..fa88cccbc2 100644
--- a/libcxx/include/__random/mersenne_twister_engine.h
+++ b/libcxx/include/__random/mersenne_twister_engine.h
@@ -401,38 +401,31 @@ operator==(const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _D
                                          _Bp, _Tp, _Cp, _Lp, _Fp>& __y)
 {
     if (__x.__i_ == __y.__i_)
-        return std::equal(__x.__x_, __x.__x_ + _Np, __y.__x_);
+      return std::equal(__x.__x_, __x.__x_ + _Np, __y.__x_);
     if (__x.__i_ == 0 || __y.__i_ == 0)
     {
-        size_t __j = std::min(_Np - __x.__i_, _Np - __y.__i_);
-        if (!std::equal(__x.__x_ + __x.__i_, __x.__x_ + __x.__i_ + __j,
-                         __y.__x_ + __y.__i_))
-            return false;
-        if (__x.__i_ == 0)
-            return std::equal(__x.__x_ + __j, __x.__x_ + _Np, __y.__x_);
-        return std::equal(__x.__x_, __x.__x_ + (_Np - __j), __y.__x_ + __j);
+      size_t __j = std::min(_Np - __x.__i_, _Np - __y.__i_);
+      if (!std::equal(__x.__x_ + __x.__i_, __x.__x_ + __x.__i_ + __j, __y.__x_ + __y.__i_))
+        return false;
+      if (__x.__i_ == 0)
+        return std::equal(__x.__x_ + __j, __x.__x_ + _Np, __y.__x_);
+      return std::equal(__x.__x_, __x.__x_ + (_Np - __j), __y.__x_ + __j);
     }
     if (__x.__i_ < __y.__i_)
     {
         size_t __j = _Np - __y.__i_;
-        if (!std::equal(__x.__x_ + __x.__i_, __x.__x_ + (__x.__i_ + __j),
-                         __y.__x_ + __y.__i_))
-            return false;
-        if (!std::equal(__x.__x_ + (__x.__i_ + __j), __x.__x_ + _Np,
-                         __y.__x_))
-            return false;
-        return std::equal(__x.__x_, __x.__x_ + __x.__i_,
-                           __y.__x_ + (_Np - (__x.__i_ + __j)));
+        if (!std::equal(__x.__x_ + __x.__i_, __x.__x_ + (__x.__i_ + __j), __y.__x_ + __y.__i_))
+          return false;
+        if (!std::equal(__x.__x_ + (__x.__i_ + __j), __x.__x_ + _Np, __y.__x_))
+          return false;
+        return std::equal(__x.__x_, __x.__x_ + __x.__i_, __y.__x_ + (_Np - (__x.__i_ + __j)));
     }
     size_t __j = _Np - __x.__i_;
-    if (!std::equal(__y.__x_ + __y.__i_, __y.__x_ + (__y.__i_ + __j),
-                     __x.__x_ + __x.__i_))
-        return false;
-    if (!std::equal(__y.__x_ + (__y.__i_ + __j), __y.__x_ + _Np,
-                     __x.__x_))
-        return false;
-    return std::equal(__y.__x_, __y.__x_ + __y.__i_,
-                       __x.__x_ + (_Np - (__y.__i_ + __j)));
+    if (!std::equal(__y.__x_ + __y.__i_, __y.__x_ + (__y.__i_ + __j), __x.__x_ + __x.__i_))
+      return false;
+    if (!std::equal(__y.__x_ + (__y.__i_ + __j), __y.__x_ + _Np, __x.__x_))
+      return false;
+    return std::equal(__y.__x_, __y.__x_ + __y.__i_, __x.__x_ + (_Np - (__y.__i_ + __j)));
 }
 
 template <class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
diff --git a/libcxx/include/__random/piecewise_constant_distribution.h b/libcxx/include/__random/piecewise_constant_distribution.h
index f5b9029020..c96d34c7b1 100644
--- a/libcxx/include/__random/piecewise_constant_distribution.h
+++ b/libcxx/include/__random/piecewise_constant_distribution.h
@@ -188,15 +188,12 @@ void
 piecewise_constant_distribution<_RealType>::param_type::__init()
 {
     // __densities_ contains non-normalized areas
-    result_type __total_area = std::accumulate(__densities_.begin(),
-                                                __densities_.end(),
-                                                result_type());
+    result_type __total_area = std::accumulate(__densities_.begin(), __densities_.end(), result_type());
     for (size_t __i = 0; __i < __densities_.size(); ++__i)
         __densities_[__i] /= __total_area;
     // __densities_ contains normalized areas
     __areas_.assign(__densities_.size(), result_type());
-    std::partial_sum(__densities_.begin(), __densities_.end() - 1,
-                                                          __areas_.begin() + 1);
+    std::partial_sum(__densities_.begin(), __densities_.end() - 1, __areas_.begin() + 1);
     // __areas_ contains partial sums of normalized areas: [0, __densities_ - 1]
     __densities_.back() = 1 - __areas_.back();  // correct round off error
     for (size_t __i = 0; __i < __densities_.size(); ++__i)
@@ -289,8 +286,7 @@ piecewise_constant_distribution<_RealType>::operator()(_URNG& __g, const param_t
     static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
     typedef uniform_real_distribution<result_type> _Gen;
     result_type __u = _Gen()(__g);
-    ptrdiff_t __k = std::upper_bound(__p.__areas_.begin(), __p.__areas_.end(),
-                                      __u) - __p.__areas_.begin() - 1;
+    ptrdiff_t __k   = std::upper_bound(__p.__areas_.begin(), __p.__areas_.end(), __u) - __p.__areas_.begin() - 1;
     return (__u - __p.__areas_[__k]) / __p.__densities_[__k] + __p.__b_[__k];
 }
 
diff --git a/libcxx/include/__random/piecewise_linear_distribution.h b/libcxx/include/__random/piecewise_linear_distribution.h
index 824e089b0c..e0f8171979 100644
--- a/libcxx/include/__random/piecewise_linear_distribution.h
+++ b/libcxx/include/__random/piecewise_linear_distribution.h
@@ -294,8 +294,7 @@ piecewise_linear_distribution<_RealType>::operator()(_URNG& __g, const param_typ
     static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
     typedef uniform_real_distribution<result_type> _Gen;
     result_type __u = _Gen()(__g);
-    ptrdiff_t __k = std::upper_bound(__p.__areas_.begin(), __p.__areas_.end(),
-                                      __u) - __p.__areas_.begin() - 1;
+    ptrdiff_t __k   = std::upper_bound(__p.__areas_.begin(), __p.__areas_.end(), __u) - __p.__areas_.begin() - 1;
     __u -= __p.__areas_[__k];
     const result_type __dk = __p.__densities_[__k];
     const result_type __dk1 = __p.__densities_[__k+1];
@@ -305,9 +304,8 @@ piecewise_linear_distribution<_RealType>::operator()(_URNG& __g, const param_typ
         return __u / __dk + __bk;
     const result_type __bk1 = __p.__b_[__k+1];
     const result_type __deltab = __bk1 - __bk;
-    return (__bk * __dk1 - __bk1 * __dk +
-        std::sqrt(__deltab * (__deltab * __dk * __dk + 2 * __deltad * __u))) /
-        __deltad;
+    return (__bk * __dk1 - __bk1 * __dk + std::sqrt(__deltab * (__deltab * __dk * __dk + 2 * __deltad * __u))) /
+           __deltad;
 }
 
 template <class _CharT, class _Traits, class _RT>
diff --git a/libcxx/include/__random/poisson_distribution.h b/libcxx/include/__random/poisson_distribution.h
index 12641addf4..a7a0a6ebaf 100644
--- a/libcxx/include/__random/poisson_distribution.h
+++ b/libcxx/include/__random/poisson_distribution.h
@@ -131,7 +131,7 @@ poisson_distribution<_IntType>::param_type::param_type(double __mean)
     {
         __s_ = 0;
         __d_ = 0;
-        __l_ = std::exp(-__mean_);
+        __l_     = std::exp(-__mean_);
         __omega_ = 0;
         __c3_ = 0;
         __c2_ = 0;
@@ -141,17 +141,17 @@ poisson_distribution<_IntType>::param_type::param_type(double __mean)
     }
     else
     {
-        __s_ = std::sqrt(__mean_);
-        __d_ = 6 * __mean_ * __mean_;
-        __l_ = std::trunc(__mean_ - 1.1484);
-        __omega_ = .3989423 / __s_;
-        double __b1 = .4166667E-1 / __mean_;
-        double __b2 = .3 * __b1 * __b1;
-        __c3_ = .1428571 * __b1 * __b2;
-        __c2_ = __b2 - 15. * __c3_;
-        __c1_ = __b1 - 6. * __b2 + 45. * __c3_;
-        __c0_ = 1. - __b1 + 3. * __b2 - 15. * __c3_;
-        __c_ = .1069 / __mean_;
+      __s_        = std::sqrt(__mean_);
+      __d_        = 6 * __mean_ * __mean_;
+      __l_        = std::trunc(__mean_ - 1.1484);
+      __omega_    = .3989423 / __s_;
+      double __b1 = .4166667E-1 / __mean_;
+      double __b2 = .3 * __b1 * __b1;
+      __c3_       = .1428571 * __b1 * __b2;
+      __c2_       = __b2 - 15. * __c3_;
+      __c1_       = __b1 - 6. * __b2 + 45. * __c3_;
+      __c0_       = 1. - __b1 + 3. * __b2 - 15. * __c3_;
+      __c_        = .1069 / __mean_;
     }
 }
 
@@ -176,13 +176,13 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
         double __u;
         if (__g > 0)
         {
-            __tx = std::trunc(__g);
-            if (__tx >= __pr.__l_)
-                return std::__clamp_to_integral<result_type>(__tx);
-            __difmuk = __pr.__mean_ - __tx;
-            __u = __urd(__urng);
-            if (__pr.__d_ * __u >= __difmuk * __difmuk * __difmuk)
-                return std::__clamp_to_integral<result_type>(__tx);
+          __tx = std::trunc(__g);
+          if (__tx >= __pr.__l_)
+            return std::__clamp_to_integral<result_type>(__tx);
+          __difmuk = __pr.__mean_ - __tx;
+          __u      = __urd(__urng);
+          if (__pr.__d_ * __u >= __difmuk * __difmuk * __difmuk)
+            return std::__clamp_to_integral<result_type>(__tx);
         }
         exponential_distribution<double> __edist;
         for (bool __using_exp_dist = false; true; __using_exp_dist = true)
@@ -198,7 +198,7 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
                     __u += __u - 1;
                     __t = 1.8 + (__u < 0 ? -__e : __e);
                 } while (__t <= -.6744);
-                __tx = std::trunc(__pr.__mean_ + __pr.__s_ * __t);
+                __tx             = std::trunc(__pr.__mean_ + __pr.__s_ * __t);
                 __difmuk = __pr.__mean_ - __tx;
                 __using_exp_dist = true;
             }
@@ -209,7 +209,7 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
                 const double __fac[] = {1, 1, 2, 6, 24, 120, 720, 5040,
                                              40320, 362880};
                 __px = -__pr.__mean_;
-                __py = std::pow(__pr.__mean_, (double)__tx) / __fac[static_cast<int>(__tx)];
+                __py                 = std::pow(__pr.__mean_, (double)__tx) / __fac[static_cast<int>(__tx)];
             }
             else
             {
@@ -217,7 +217,7 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
                 __del -= 4.8 * __del * __del * __del;
                 double __v = __difmuk / __tx;
                 if (std::abs(__v) > 0.25)
-                    __px = __tx * std::log(1 + __v) - __difmuk - __del;
+                  __px = __tx * std::log(1 + __v) - __difmuk - __del;
                 else
                     __px = __tx * __v * __v * (((((((.1250060 * __v + -.1384794) *
                            __v + .1421878) * __v + -.1661269) * __v + .2000118) *
@@ -231,14 +231,13 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
                                         __r2 + __pr.__c1_) * __r2 + __pr.__c0_);
             if (__using_exp_dist)
             {
-                if (__pr.__c_ * std::abs(__u) <= __py * std::exp(__px + __e) -
-                                                   __fy * std::exp(__fx + __e))
-                    break;
+              if (__pr.__c_ * std::abs(__u) <= __py * std::exp(__px + __e) - __fy * std::exp(__fx + __e))
+                break;
             }
             else
             {
-                if (__fy - __u * __fy <= __py * std::exp(__px - __fx))
-                    break;
+              if (__fy - __u * __fy <= __py * std::exp(__px - __fx))
+                break;
             }
         }
     }
diff --git a/libcxx/include/__random/seed_seq.h b/libcxx/include/__random/seed_seq.h
index 7ae9f492c8..36f70f4439 100644
--- a/libcxx/include/__random/seed_seq.h
+++ b/libcxx/include/__random/seed_seq.h
@@ -59,10 +59,10 @@ public:
     // property functions
     _LIBCPP_HIDE_FROM_ABI
     size_t size() const _NOEXCEPT {return __v_.size();}
-    template<class _OutputIterator>
-        _LIBCPP_HIDE_FROM_ABI
-        void param(_OutputIterator __dest) const
-            {std::copy(__v_.begin(), __v_.end(), __dest);}
+    template <class _OutputIterator>
+    _LIBCPP_HIDE_FROM_ABI void param(_OutputIterator __dest) const {
+      std::copy(__v_.begin(), __v_.end(), __dest);
+    }
 
     seed_seq(const seed_seq&) = delete;
     void operator=(const seed_seq&) = delete;
@@ -91,25 +91,20 @@ seed_seq::generate(_RandomAccessIterator __first, _RandomAccessIterator __last)
 {
     if (__first != __last)
     {
-        std::fill(__first, __last, 0x8b8b8b8b);
-        const size_t __n = static_cast<size_t>(__last - __first);
-        const size_t __s = __v_.size();
-        const size_t __t = (__n >= 623) ? 11
-                         : (__n >= 68) ? 7
-                         : (__n >= 39) ? 5
-                         : (__n >= 7)  ? 3
-                         : (__n - 1) / 2;
-        const size_t __p = (__n - __t) / 2;
-        const size_t __q = __p + __t;
-        const size_t __m = std::max(__s + 1, __n);
-        // __k = 0;
-        {
-            result_type __r = 1664525 * _Tp(__first[0] ^ __first[__p]
-                                                      ^  __first[__n - 1]);
-            __first[__p] += __r;
-            __r += __s;
-            __first[__q] += __r;
-            __first[0] = __r;
+      std::fill(__first, __last, 0x8b8b8b8b);
+      const size_t __n = static_cast<size_t>(__last - __first);
+      const size_t __s = __v_.size();
+      const size_t __t = (__n >= 623) ? 11 : (__n >= 68) ? 7 : (__n >= 39) ? 5 : (__n >= 7) ? 3 : (__n - 1) / 2;
+      const size_t __p = (__n - __t) / 2;
+      const size_t __q = __p + __t;
+      const size_t __m = std::max(__s + 1, __n);
+      // __k = 0;
+      {
+        result_type __r = 1664525 * _Tp(__first[0] ^ __first[__p] ^ __first[__n - 1]);
+        __first[__p] += __r;
+        __r += __s;
+        __first[__q] += __r;
+        __first[0] = __r;
         }
         // Initialize indexing terms used with if statements as an optimization to
         // avoid calculating modulo n on every loop iteration for each term.
diff --git a/libcxx/include/__random/shuffle_order_engine.h b/libcxx/include/__random/shuffle_order_engine.h
index 4836dee489..6e7c7be95f 100644
--- a/libcxx/include/__random/shuffle_order_engine.h
+++ b/libcxx/include/__random/shuffle_order_engine.h
@@ -92,9 +92,7 @@ public:
     explicit shuffle_order_engine(const _Engine& __e)
         : __e_(__e) {__init();}
 #ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI
-    explicit shuffle_order_engine(_Engine&& __e)
-        : __e_(std::move(__e)) {__init();}
+    _LIBCPP_HIDE_FROM_ABI explicit shuffle_order_engine(_Engine&& __e) : __e_(std::move(__e)) { __init(); }
 #endif // _LIBCPP_CXX03_LANG
     _LIBCPP_HIDE_FROM_ABI
     explicit shuffle_order_engine(result_type __sd) : __e_(__sd) {__init();}
@@ -210,8 +208,7 @@ operator==(
     const shuffle_order_engine<_Eng, _Kp>& __x,
     const shuffle_order_engine<_Eng, _Kp>& __y)
 {
-    return __x.__y_ == __y.__y_ && std::equal(__x.__v_, __x.__v_ + _Kp, __y.__v_) &&
-           __x.__e_ == __y.__e_;
+  return __x.__y_ == __y.__y_ && std::equal(__x.__v_, __x.__v_ + _Kp, __y.__v_) && __x.__e_ == __y.__e_;
 }
 
 template<class _Eng, size_t _Kp>
diff --git a/libcxx/include/__random/student_t_distribution.h b/libcxx/include/__random/student_t_distribution.h
index d52510dca4..f3a4e2af27 100644
--- a/libcxx/include/__random/student_t_distribution.h
+++ b/libcxx/include/__random/student_t_distribution.h
@@ -115,7 +115,7 @@ student_t_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
     static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
     gamma_distribution<result_type> __gd(__p.n() * .5, 2);
-    return __nd_(__g) * std::sqrt(__p.n()/__gd(__g));
+    return __nd_(__g) * std::sqrt(__p.n() / __gd(__g));
 }
 
 template <class _CharT, class _Traits, class _RT>
diff --git a/libcxx/include/__random/subtract_with_carry_engine.h b/libcxx/include/__random/subtract_with_carry_engine.h
index fe2a66800a..d19d5bbf12 100644
--- a/libcxx/include/__random/subtract_with_carry_engine.h
+++ b/libcxx/include/__random/subtract_with_carry_engine.h
@@ -253,38 +253,31 @@ operator==(
     if (__x.__c_ != __y.__c_)
         return false;
     if (__x.__i_ == __y.__i_)
-        return std::equal(__x.__x_, __x.__x_ + _Rp, __y.__x_);
+      return std::equal(__x.__x_, __x.__x_ + _Rp, __y.__x_);
     if (__x.__i_ == 0 || __y.__i_ == 0)
     {
-        size_t __j = std::min(_Rp - __x.__i_, _Rp - __y.__i_);
-        if (!std::equal(__x.__x_ + __x.__i_, __x.__x_ + __x.__i_ + __j,
-                         __y.__x_ + __y.__i_))
-            return false;
-        if (__x.__i_ == 0)
-            return std::equal(__x.__x_ + __j, __x.__x_ + _Rp, __y.__x_);
-        return std::equal(__x.__x_, __x.__x_ + (_Rp - __j), __y.__x_ + __j);
+      size_t __j = std::min(_Rp - __x.__i_, _Rp - __y.__i_);
+      if (!std::equal(__x.__x_ + __x.__i_, __x.__x_ + __x.__i_ + __j, __y.__x_ + __y.__i_))
+        return false;
+      if (__x.__i_ == 0)
+        return std::equal(__x.__x_ + __j, __x.__x_ + _Rp, __y.__x_);
+      return std::equal(__x.__x_, __x.__x_ + (_Rp - __j), __y.__x_ + __j);
     }
     if (__x.__i_ < __y.__i_)
     {
         size_t __j = _Rp - __y.__i_;
-        if (!std::equal(__x.__x_ + __x.__i_, __x.__x_ + (__x.__i_ + __j),
-                         __y.__x_ + __y.__i_))
-            return false;
-        if (!std::equal(__x.__x_ + (__x.__i_ + __j), __x.__x_ + _Rp,
-                         __y.__x_))
-            return false;
-        return std::equal(__x.__x_, __x.__x_ + __x.__i_,
-                           __y.__x_ + (_Rp - (__x.__i_ + __j)));
+        if (!std::equal(__x.__x_ + __x.__i_, __x.__x_ + (__x.__i_ + __j), __y.__x_ + __y.__i_))
+          return false;
+        if (!std::equal(__x.__x_ + (__x.__i_ + __j), __x.__x_ + _Rp, __y.__x_))
+          return false;
+        return std::equal(__x.__x_, __x.__x_ + __x.__i_, __y.__x_ + (_Rp - (__x.__i_ + __j)));
     }
     size_t __j = _Rp - __x.__i_;
-    if (!std::equal(__y.__x_ + __y.__i_, __y.__x_ + (__y.__i_ + __j),
-                     __x.__x_ + __x.__i_))
-        return false;
-    if (!std::equal(__y.__x_ + (__y.__i_ + __j), __y.__x_ + _Rp,
-                     __x.__x_))
-        return false;
-    return std::equal(__y.__x_, __y.__x_ + __y.__i_,
-                       __x.__x_ + (_Rp - (__y.__i_ + __j)));
+    if (!std::equal(__y.__x_ + __y.__i_, __y.__x_ + (__y.__i_ + __j), __x.__x_ + __x.__i_))
+      return false;
+    if (!std::equal(__y.__x_ + (__y.__i_ + __j), __y.__x_ + _Rp, __x.__x_))
+      return false;
+    return std::equal(__y.__x_, __y.__x_ + __y.__i_, __x.__x_ + (_Rp - (__y.__i_ + __j)));
 }
 
 template<class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
diff --git a/libcxx/include/__random/uniform_real_distribution.h b/libcxx/include/__random/uniform_real_distribution.h
index c5ee527353..9341331a01 100644
--- a/libcxx/include/__random/uniform_real_distribution.h
+++ b/libcxx/include/__random/uniform_real_distribution.h
@@ -116,9 +116,7 @@ typename uniform_real_distribution<_RealType>::result_type
 uniform_real_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
     static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
-    return (__p.b() - __p.a())
-        * std::generate_canonical<_RealType, numeric_limits<_RealType>::digits>(__g)
-        + __p.a();
+    return (__p.b() - __p.a()) * std::generate_canonical<_RealType, numeric_limits<_RealType>::digits>(__g) + __p.a();
 }
 
 template <class _CharT, class _Traits, class _RT>
diff --git a/libcxx/include/__random/weibull_distribution.h b/libcxx/include/__random/weibull_distribution.h
index 099cfdd617..ffbdfd8151 100644
--- a/libcxx/include/__random/weibull_distribution.h
+++ b/libcxx/include/__random/weibull_distribution.h
@@ -85,8 +85,9 @@ public:
     template<class _URNG>
         _LIBCPP_HIDE_FROM_ABI
         result_type operator()(_URNG& __g, const param_type& __p)
-        {return __p.b() *
-            std::pow(exponential_distribution<result_type>()(__g), 1/__p.a());}
+        {
+      return __p.b() * std::pow(exponential_distribution<result_type>()(__g), 1 / __p.a());
+    }
 
     // property functions
     _LIBCPP_HIDE_FROM_ABI
diff --git a/libcxx/include/__string/char_traits.h b/libcxx/include/__string/char_traits.h
index 9ec78dc393..79213ee862 100644
--- a/libcxx/include/__string/char_traits.h
+++ b/libcxx/include/__string/char_traits.h
@@ -710,15 +710,15 @@ inline _SizeT _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI
 __str_rfind(const _CharT *__p, _SizeT __sz,
         const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
 {
-    __pos = std::min(__pos, __sz);
-    if (__n < __sz - __pos)
-        __pos += __n;
-    else
-        __pos = __sz;
-    const _CharT* __r = std::__find_end_classic(__p, __p + __pos, __s, __s + __n, _Traits::eq);
-    if (__n > 0 && __r == __p + __pos)
-        return __npos;
-    return static_cast<_SizeT>(__r - __p);
+  __pos = std::min(__pos, __sz);
+  if (__n < __sz - __pos)
+    __pos += __n;
+  else
+    __pos = __sz;
+  const _CharT* __r = std::__find_end_classic(__p, __p + __pos, __s, __s + __n, _Traits::eq);
+  if (__n > 0 && __r == __p + __pos)
+    return __npos;
+  return static_cast<_SizeT>(__r - __p);
 }
 
 // __str_find_first_of
@@ -729,8 +729,7 @@ __str_find_first_of(const _CharT *__p, _SizeT __sz,
 {
     if (__pos >= __sz || __n == 0)
         return __npos;
-    const _CharT* __r = std::__find_first_of_ce
-        (__p + __pos, __p + __sz, __s, __s + __n, _Traits::eq );
+    const _CharT* __r = std::__find_first_of_ce(__p + __pos, __p + __sz, __s, __s + __n, _Traits::eq);
     if (__r == __p + __sz)
         return __npos;
     return static_cast<_SizeT>(__r - __p);
diff --git a/libcxx/include/__thread/thread.h b/libcxx/include/__thread/thread.h
index ee37a0320d..b0f8d29840 100644
--- a/libcxx/include/__thread/thread.h
+++ b/libcxx/include/__thread/thread.h
@@ -195,8 +195,7 @@ public:
         return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
-    void swap(thread& __t) _NOEXCEPT {std::swap(__t_, __t.__t_);}
+    _LIBCPP_HIDE_FROM_ABI void swap(thread& __t) _NOEXCEPT { std::swap(__t_, __t.__t_); }
 
     _LIBCPP_HIDE_FROM_ABI
     bool joinable() const _NOEXCEPT {return !__libcpp_thread_isnull(&__t_);}
@@ -217,7 +216,7 @@ inline _LIBCPP_HIDE_FROM_ABI
 void
 __thread_execute(tuple<_TSp, _Fp, _Args...>& __t, __tuple_indices<_Indices...>)
 {
-    std::__invoke(std::move(std::get<1>(__t)), std::move(std::get<_Indices>(__t))...);
+  std::__invoke(std::move(std::get<1>(__t)), std::move(std::get<_Indices>(__t))...);
 }
 
 template <class _Fp>
@@ -240,10 +239,7 @@ thread::thread(_Fp&& __f, _Args&&... __args)
     typedef unique_ptr<__thread_struct> _TSPtr;
     _TSPtr __tsp(new __thread_struct);
     typedef tuple<_TSPtr, __decay_t<_Fp>, __decay_t<_Args>...> _Gp;
-    unique_ptr<_Gp> __p(
-            new _Gp(std::move(__tsp),
-                    std::forward<_Fp>(__f),
-                    std::forward<_Args>(__args)...));
+    unique_ptr<_Gp> __p(new _Gp(std::move(__tsp), std::forward<_Fp>(__f), std::forward<_Args>(__args)...));
     int __ec = std::__libcpp_thread_create(&__t_, &__thread_proxy<_Gp>, __p.get());
     if (__ec == 0)
         __p.release();
diff --git a/libcxx/include/__utility/exchange.h b/libcxx/include/__utility/exchange.h
index 819549a9dc..c66b45b334 100644
--- a/libcxx/include/__utility/exchange.h
+++ b/libcxx/include/__utility/exchange.h
@@ -30,9 +30,9 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 _T1 exchange(_T1& __obj, _T2&& __new_value)
     noexcept(is_nothrow_move_constructible<_T1>::value && is_nothrow_assignable<_T1&, _T2>::value)
 {
-    _T1 __old_value = std::move(__obj);
-    __obj = std::forward<_T2>(__new_value);
-    return __old_value;
+  _T1 __old_value = std::move(__obj);
+  __obj           = std::forward<_T2>(__new_value);
+  return __old_value;
 }
 #endif // _LIBCPP_STD_VER >= 14
 
diff --git a/libcxx/src/chrono.cpp b/libcxx/src/chrono.cpp
index c4446070d0..0eb5c4b846 100644
--- a/libcxx/src/chrono.cpp
+++ b/libcxx/src/chrono.cpp
@@ -94,9 +94,7 @@ public:
 static system_clock::time_point __libcpp_system_clock_now() {
   // FILETIME is in 100ns units
   using filetime_duration =
-      std::chrono::duration<__int64,
-                              std::ratio_multiply<std::ratio<100, 1>,
-                                                    nanoseconds::period>>;
+      std::chrono::duration<__int64, std::ratio_multiply<std::ratio<100, 1>, nanoseconds::period>>;
 
   // The Windows epoch is Jan 1 1601, the Unix epoch Jan 1 1970.
   static constexpr const seconds nt_to_unix_epoch{11644473600};
diff --git a/libcxx/src/ios.cpp b/libcxx/src/ios.cpp
index e80007d42c..8a93e6752c 100644
--- a/libcxx/src/ios.cpp
+++ b/libcxx/src/ios.cpp
@@ -152,7 +152,7 @@ static size_t __ios_new_cap(size_t __req_size, size_t __current_cap)
 { // Precondition: __req_size > __current_cap
     const size_t mx = std::numeric_limits<size_t>::max() / sizeof(_Tp);
     if (__req_size < mx/2)
-        return std::max(2 * __current_cap, __req_size);
+      return std::max(2 * __current_cap, __req_size);
     else
         return mx;
 }
@@ -394,24 +394,24 @@ ios_base::move(ios_base& rhs)
 void
 ios_base::swap(ios_base& rhs) noexcept
 {
-    std::swap(__fmtflags_, rhs.__fmtflags_);
-    std::swap(__precision_, rhs.__precision_);
-    std::swap(__width_, rhs.__width_);
-    std::swap(__rdstate_, rhs.__rdstate_);
-    std::swap(__exceptions_, rhs.__exceptions_);
-    locale& lhs_loc = *reinterpret_cast<locale*>(&__loc_);
-    locale& rhs_loc = *reinterpret_cast<locale*>(&rhs.__loc_);
-    std::swap(lhs_loc, rhs_loc);
-    std::swap(__fn_, rhs.__fn_);
-    std::swap(__index_, rhs.__index_);
-    std::swap(__event_size_, rhs.__event_size_);
-    std::swap(__event_cap_, rhs.__event_cap_);
-    std::swap(__iarray_, rhs.__iarray_);
-    std::swap(__iarray_size_, rhs.__iarray_size_);
-    std::swap(__iarray_cap_, rhs.__iarray_cap_);
-    std::swap(__parray_, rhs.__parray_);
-    std::swap(__parray_size_, rhs.__parray_size_);
-    std::swap(__parray_cap_, rhs.__parray_cap_);
+  std::swap(__fmtflags_, rhs.__fmtflags_);
+  std::swap(__precision_, rhs.__precision_);
+  std::swap(__width_, rhs.__width_);
+  std::swap(__rdstate_, rhs.__rdstate_);
+  std::swap(__exceptions_, rhs.__exceptions_);
+  locale& lhs_loc = *reinterpret_cast<locale*>(&__loc_);
+  locale& rhs_loc = *reinterpret_cast<locale*>(&rhs.__loc_);
+  std::swap(lhs_loc, rhs_loc);
+  std::swap(__fn_, rhs.__fn_);
+  std::swap(__index_, rhs.__index_);
+  std::swap(__event_size_, rhs.__event_size_);
+  std::swap(__event_cap_, rhs.__event_cap_);
+  std::swap(__iarray_, rhs.__iarray_);
+  std::swap(__iarray_size_, rhs.__iarray_size_);
+  std::swap(__iarray_cap_, rhs.__iarray_cap_);
+  std::swap(__parray_, rhs.__parray_);
+  std::swap(__parray_size_, rhs.__parray_size_);
+  std::swap(__parray_cap_, rhs.__parray_cap_);
 }
 
 void
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 71f7ca482d..6a5e351282 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -413,28 +413,28 @@ locale::__imp::__imp(const __imp& other, const __imp& one, locale::category c)
 #endif // _LIBCPP_HAS_NO_EXCEPTIONS
         if (c & locale::collate)
         {
-            install_from<std::collate<char> >(one);
+          install_from<std::collate<char> >(one);
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-            install_from<std::collate<wchar_t> >(one);
+          install_from<std::collate<wchar_t> >(one);
 #endif
         }
         if (c & locale::ctype)
         {
-            install_from<std::ctype<char> >(one);
+          install_from<std::ctype<char> >(one);
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-            install_from<std::ctype<wchar_t> >(one);
+          install_from<std::ctype<wchar_t> >(one);
 #endif
-            install_from<std::codecvt<char, char, mbstate_t> >(one);
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
-            install_from<std::codecvt<char16_t, char, mbstate_t> >(one);
-            install_from<std::codecvt<char32_t, char, mbstate_t> >(one);
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+          install_from<std::codecvt<char, char, mbstate_t> >(one);
+          _LIBCPP_SUPPRESS_DEPRECATED_PUSH
+          install_from<std::codecvt<char16_t, char, mbstate_t> >(one);
+          install_from<std::codecvt<char32_t, char, mbstate_t> >(one);
+          _LIBCPP_SUPPRESS_DEPRECATED_POP
 #ifndef _LIBCPP_HAS_NO_CHAR8_T
-            install_from<std::codecvt<char16_t, char8_t, mbstate_t> >(one);
-            install_from<std::codecvt<char32_t, char8_t, mbstate_t> >(one);
+          install_from<std::codecvt<char16_t, char8_t, mbstate_t> >(one);
+          install_from<std::codecvt<char32_t, char8_t, mbstate_t> >(one);
 #endif
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-            install_from<std::codecvt<wchar_t, char, mbstate_t> >(one);
+          install_from<std::codecvt<wchar_t, char, mbstate_t> >(one);
 #endif
         }
         if (c & locale::monetary)
@@ -482,9 +482,9 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
         }
         if (c & locale::messages)
         {
-            install_from<std::messages<char> >(one);
+          install_from<std::messages<char> >(one);
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-            install_from<std::messages<wchar_t> >(one);
+          install_from<std::messages<wchar_t> >(one);
 #endif
         }
 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
diff --git a/libcxx/src/regex.cpp b/libcxx/src/regex.cpp
index 0825c758bf..7fd520b1b2 100644
--- a/libcxx/src/regex.cpp
+++ b/libcxx/src/regex.cpp
@@ -349,30 +349,26 @@ struct use_strcmp
 string
 __get_collation_name(const char* s)
 {
-    const collationnames* i =
-            std::lower_bound(begin(collatenames), end(collatenames), s, use_strcmp());
-    string r;
-    if (i != end(collatenames) && strcmp(s, i->elem_) == 0)
-        r = char(i->char_);
-    return r;
+  const collationnames* i = std::lower_bound(begin(collatenames), end(collatenames), s, use_strcmp());
+  string r;
+  if (i != end(collatenames) && strcmp(s, i->elem_) == 0)
+    r = char(i->char_);
+  return r;
 }
 
 regex_traits<char>::char_class_type
 __get_classname(const char* s, bool __icase)
 {
-    const classnames* i =
-            std::lower_bound(begin(ClassNames), end(ClassNames), s, use_strcmp());
-    regex_traits<char>::char_class_type r = 0;
-    if (i != end(ClassNames) && strcmp(s, i->elem_) == 0)
-    {
-        r = i->mask_;
-        if (r == regex_traits<char>::__regex_word)
-            r |= ctype_base::alnum | ctype_base::upper | ctype_base::lower;
-        else if (__icase)
-        {
-            if (r & (ctype_base::lower | ctype_base::upper))
-                r |= ctype_base::alpha;
-        }
+  const classnames* i                   = std::lower_bound(begin(ClassNames), end(ClassNames), s, use_strcmp());
+  regex_traits<char>::char_class_type r = 0;
+  if (i != end(ClassNames) && strcmp(s, i->elem_) == 0) {
+    r = i->mask_;
+    if (r == regex_traits<char>::__regex_word)
+      r |= ctype_base::alnum | ctype_base::upper | ctype_base::lower;
+    else if (__icase) {
+      if (r & (ctype_base::lower | ctype_base::upper))
+        r |= ctype_base::alpha;
+    }
     }
     return r;
 }
diff --git a/libcxx/src/std_stream.h b/libcxx/src/std_stream.h
index 39a2b70b4f..389cf9967d 100644
--- a/libcxx/src/std_stream.h
+++ b/libcxx/src/std_stream.h
@@ -192,7 +192,7 @@ __stdinbuf<_CharT>::__getchar(bool __consume)
         switch (__r)
         {
         case std::codecvt_base::ok:
-            break;
+          break;
         case codecvt_base::partial:
             *__st_ = __sv_st;
             if (__nread == sizeof(__extbuf))
@@ -208,8 +208,8 @@ __stdinbuf<_CharT>::__getchar(bool __consume)
         case codecvt_base::error:
             return traits_type::eof();
         case std::codecvt_base::noconv:
-            __1buf = static_cast<char_type>(__extbuf[0]);
-            break;
+          __1buf = static_cast<char_type>(__extbuf[0]);
+          break;
         }
     } while (__r == std::codecvt_base::partial);
     if (!__consume)
@@ -252,11 +252,11 @@ __stdinbuf<_CharT>::pbackfail(int_type __c)
                                   __extbuf, __extbuf + sizeof(__extbuf), __enxt))
         {
         case std::codecvt_base::ok:
-            break;
+          break;
         case std::codecvt_base::noconv:
-            __extbuf[0] = static_cast<char>(__last_consumed_);
-            __enxt = __extbuf + 1;
-            break;
+          __extbuf[0] = static_cast<char>(__last_consumed_);
+          __enxt      = __extbuf + 1;
+          break;
         case codecvt_base::partial:
         case codecvt_base::error:
             return traits_type::eof();
diff --git a/libcxx/src/vector.cpp b/libcxx/src/vector.cpp
index b09db92cf8..b6153b0e9b 100644
--- a/libcxx/src/vector.cpp
+++ b/libcxx/src/vector.cpp
@@ -21,13 +21,9 @@ struct __vector_base_common<true> {
   _LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_out_of_range() const;
 };
 
-void __vector_base_common<true>::__throw_length_error() const {
-  std::__throw_length_error("vector");
-}
+void __vector_base_common<true>::__throw_length_error() const { std::__throw_length_error("vector"); }
 
-void __vector_base_common<true>::__throw_out_of_range() const {
-  std::__throw_out_of_range("vector");
-}
+void __vector_base_common<true>::__throw_out_of_range() const { std::__throw_out_of_range("vector"); }
 
 #endif // _LIBCPP_ABI_DO_NOT_EXPORT_VECTOR_BASE_COMMON
 

Copy link
Member

@EricWF EricWF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG I cannot wait to stop seeing "expanded from here "_VSTD"..." in diagnostic messages.

@JoeLoser
Copy link
Member

JoeLoser commented Dec 4, 2023

Excited to finally see this happen. Thank you!

As part of the upcoming clang-formatting of libc++, this patch performs
the long desired removal of the _VSTD macro.

See https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all
for the clang-format proposal.
@ldionne ldionne force-pushed the review/rename-VSTD-macro branch from f9d500d to 0171139 Compare December 4, 2023 20:27
@ldionne ldionne merged commit 77a00c0 into llvm:main Dec 5, 2023
@ldionne ldionne deleted the review/rename-VSTD-macro branch December 5, 2023 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants