[libcxx-commits] [libcxx] [libc++][test] Cleanup typos and unnecessary semicolons (PR #73435)

Stephan T. Lavavej via libcxx-commits libcxx-commits at lists.llvm.org
Sun Nov 26 02:39:05 PST 2023


https://github.com/StephanTLavavej created https://github.com/llvm/llvm-project/pull/73435

I've structured this into a series of commits for even easier reviewing, if that helps. I could easily split this up into separate PRs if desired, but as this is low-risk with simple edits, I thought one PR would be easiest.

* Drop unnecessary semicolons after function definitions.
* Cleanup comment typos.
* Cleanup `static_assert` typos.
* Cleanup test code typos.
  + There should be no functional changes, assuming I've changed all occurrences.
* Fix massive test code typos in `libcxx/test/std/input.output/filesystems/class.file_status/file_status.status.eq.ops.cpp` which repeatedly said `std::fileystem`.
  + This didn't appear to be intentional, and I'm not sure how this was compiling. I suspect that something prevented this test from running at all. Perhaps this is related to how its `UNSUPPORTED` comment weirdly lacks commas: https://github.com/llvm/llvm-project/blob/9ba74c2ee044381544c8e1e736c4c85a1a9d56bf/libcxx/test/std/input.output/filesystems/class.file_status/file_status.status.eq.ops.cpp#L9 Unlike other tests where this is comma-separated: https://github.com/llvm/llvm-project/blob/9ba74c2ee044381544c8e1e736c4c85a1a9d56bf/libcxx/test/std/input.output/syncstream/osyncstream/assign.pass.cpp#L9

>From 19accc80561e6e5cc1db6146b58d83da6e48fd24 Mon Sep 17 00:00:00 2001
From: "Stephan T. Lavavej" <stl at nuwen.net>
Date: Fri, 24 Nov 2023 20:25:35 -0800
Subject: [PATCH 1/5] Cleanup: Drop unnecessary semicolons after function
 definitions.

---
 .../forwardlist/forwardlist.ops/remove_if.pass.cpp          | 2 +-
 .../forwardlist/forwardlist.ops/unique_pred.pass.cpp        | 2 +-
 .../containers/sequences/list/list.ops/remove_if.pass.cpp   | 2 +-
 .../containers/sequences/list/list.ops/unique_pred.pass.cpp | 2 +-
 .../std/containers/views/mdspan/ConvertibleToIntegral.h     | 4 ++--
 libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h | 6 +++---
 .../test/std/containers/views/mdspan/extents/ctad.pass.cpp  | 2 +-
 .../containers/views/mdspan/mdspan/CustomTestAccessors.h    | 2 +-
 .../range.adaptors/range.zip/iterator/iter_move.pass.cpp    | 2 +-
 .../range.adaptors/range.zip/iterator/iter_swap.pass.cpp    | 2 +-
 libcxx/test/std/utilities/expected/types.h                  | 2 +-
 .../util.smartptr.shared.const/pointer_deleter.pass.cpp     | 2 +-
 .../pointer_deleter_allocator.pass.cpp                      | 2 +-
 .../allocate_shared.lwg2070.pass.cpp                        | 2 +-
 .../make_shared.private.compile.fail.cpp                    | 2 +-
 .../util.smartptr.shared.obs/op_bool.pass.cpp               | 2 +-
 .../utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp    | 4 ++--
 17 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp
index 7e26b8b48a82dfd..5b56ec002b9ad79 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp
@@ -42,7 +42,7 @@ bool g(int i)
 }
 
 struct PredLWG526 {
-    PredLWG526 (int i) : i_(i) {};
+    PredLWG526 (int i) : i_(i) {}
     ~PredLWG526() { i_ = -32767; }
     bool operator() (const PredLWG526 &p) const { return p.i_ == i_; }
 
diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp
index aed12da1c6c4a0f..154f0a14f727ea4 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp
@@ -35,7 +35,7 @@ void do_unique(L &l, Predicate pred, typename L::size_type expected)
 
 
 struct PredLWG526 {
-    PredLWG526 (int i) : i_(i) {};
+    PredLWG526 (int i) : i_(i) {}
     ~PredLWG526() { i_ = -32767; }
     bool operator() (const PredLWG526 &lhs, const PredLWG526 &rhs) const { return lhs.i_ == rhs.i_; }
 
diff --git a/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp
index c57d81ba718daa1..429d6cc925d84d7 100644
--- a/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.ops/remove_if.pass.cpp
@@ -30,7 +30,7 @@ bool g(int i)
 }
 
 struct PredLWG526 {
-    PredLWG526 (int i) : i_(i) {};
+    PredLWG526 (int i) : i_(i) {}
     ~PredLWG526() { i_ = -32767; }
     bool operator() (const PredLWG526 &p) const { return p.i_ == i_; }
 
diff --git a/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp
index e10725438ba0f5f..cb21130f85ab8e7 100644
--- a/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp
@@ -24,7 +24,7 @@ bool g(int x, int y)
 }
 
 struct PredLWG526 {
-    PredLWG526 (int i) : i_(i) {};
+    PredLWG526 (int i) : i_(i) {}
     ~PredLWG526() { i_ = -32767; }
     bool operator() (const PredLWG526 &lhs, const PredLWG526 &rhs) const { return lhs.i_ == rhs.i_; }
 
diff --git a/libcxx/test/std/containers/views/mdspan/ConvertibleToIntegral.h b/libcxx/test/std/containers/views/mdspan/ConvertibleToIntegral.h
index d6540d8adb6a089..2f31941a3ef1f23 100644
--- a/libcxx/test/std/containers/views/mdspan/ConvertibleToIntegral.h
+++ b/libcxx/test/std/containers/views/mdspan/ConvertibleToIntegral.h
@@ -12,7 +12,7 @@
 struct IntType {
   int val;
   constexpr IntType() = default;
-  constexpr IntType(int v) noexcept : val(v){};
+  constexpr IntType(int v) noexcept : val(v){}
 
   constexpr bool operator==(const IntType& rhs) const { return val == rhs.val; }
   constexpr operator int() const noexcept { return val; }
@@ -24,7 +24,7 @@ struct IntType {
 struct IntTypeNC {
   int val;
   constexpr IntTypeNC() = default;
-  constexpr IntTypeNC(int v) noexcept : val(v){};
+  constexpr IntTypeNC(int v) noexcept : val(v){}
 
   constexpr bool operator==(const IntType& rhs) const { return val == rhs.val; }
   constexpr operator int() noexcept { return val; }
diff --git a/libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h b/libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h
index 302eb2f5edd0193..7de8acc1fbf8481 100644
--- a/libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h
+++ b/libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h
@@ -76,7 +76,7 @@ class layout_wrapping_integral<WrapArg>::mapping {
 
 public:
   constexpr mapping() noexcept = delete;
-  constexpr mapping(const mapping& other) noexcept : extents_(other.extents()){};
+  constexpr mapping(const mapping& other) noexcept : extents_(other.extents()){}
   constexpr mapping(extents_type&& ext) noexcept
     requires(Wrap == 8)
       : extents_(ext) {}
@@ -240,9 +240,9 @@ class always_convertible_layout::mapping {
 public:
   constexpr mapping() noexcept = delete;
   constexpr mapping(const mapping& other) noexcept
-      : extents_(other.extents_), offset_(other.offset_), scaling_(other.scaling_){};
+      : extents_(other.extents_), offset_(other.offset_), scaling_(other.scaling_){}
   constexpr mapping(const extents_type& ext, index_type offset = 0, index_type scaling = 1) noexcept
-      : extents_(ext), offset_(offset), scaling_(scaling){};
+      : extents_(ext), offset_(offset), scaling_(scaling){}
 
   template <class OtherExtents>
   constexpr mapping(const mapping<OtherExtents>& other) noexcept {
diff --git a/libcxx/test/std/containers/views/mdspan/extents/ctad.pass.cpp b/libcxx/test/std/containers/views/mdspan/extents/ctad.pass.cpp
index 3fc7c707f036ab2..6836c57a8c380f4 100644
--- a/libcxx/test/std/containers/views/mdspan/extents/ctad.pass.cpp
+++ b/libcxx/test/std/containers/views/mdspan/extents/ctad.pass.cpp
@@ -24,7 +24,7 @@
 struct NoDefaultCtorIndex {
   size_t value;
   constexpr NoDefaultCtorIndex() = delete;
-  constexpr NoDefaultCtorIndex(size_t val) : value(val){};
+  constexpr NoDefaultCtorIndex(size_t val) : value(val){}
   constexpr operator size_t() const noexcept { return value; }
 };
 
diff --git a/libcxx/test/std/containers/views/mdspan/mdspan/CustomTestAccessors.h b/libcxx/test/std/containers/views/mdspan/mdspan/CustomTestAccessors.h
index 346f4977ca142e8..0f947cfba498ded 100644
--- a/libcxx/test/std/containers/views/mdspan/mdspan/CustomTestAccessors.h
+++ b/libcxx/test/std/containers/views/mdspan/mdspan/CustomTestAccessors.h
@@ -50,7 +50,7 @@ struct move_counted_handle {
   constexpr move_counted_handle(const move_counted_handle&) = default;
   template <class OtherT>
     requires(std::is_constructible_v<T*, OtherT*>)
-  constexpr move_counted_handle(const move_counted_handle<OtherT>& other) : ptr(other.ptr){};
+  constexpr move_counted_handle(const move_counted_handle<OtherT>& other) : ptr(other.ptr){}
   constexpr move_counted_handle(move_counted_handle&& other) {
     ptr = other.ptr;
     if !consteval {
diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp
index 8ef0c6e04e4fe2d..d4bfa395bdd0378 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp
@@ -20,7 +20,7 @@
 
 struct ThrowingMove {
   ThrowingMove() = default;
-  ThrowingMove(ThrowingMove&&){};
+  ThrowingMove(ThrowingMove&&){}
 };
 
 constexpr bool test() {
diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp
index 0c59f8b777a767f..0923b30b2e672c0 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp
@@ -19,7 +19,7 @@
 
 struct ThrowingMove {
   ThrowingMove() = default;
-  ThrowingMove(ThrowingMove&&){};
+  ThrowingMove(ThrowingMove&&){}
   ThrowingMove& operator=(ThrowingMove&&){return *this;}
 };
 
diff --git a/libcxx/test/std/utilities/expected/types.h b/libcxx/test/std/utilities/expected/types.h
index ac4a82f2baf78b4..06a7097e43cccb0 100644
--- a/libcxx/test/std/utilities/expected/types.h
+++ b/libcxx/test/std/utilities/expected/types.h
@@ -175,7 +175,7 @@ struct TailClobberer {
 
   friend constexpr bool operator==(const TailClobberer&, const TailClobberer&) = default;
 
-  friend constexpr void swap(TailClobberer&, TailClobberer&){};
+  friend constexpr void swap(TailClobberer&, TailClobberer&){}
 
 private:
   alignas(2) bool b;
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp
index 463130789416e1e..094999a87cb516d 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter.pass.cpp
@@ -53,7 +53,7 @@ class MoveDeleter
     MoveDeleter();
     MoveDeleter(MoveDeleter const&);
 public:
-    MoveDeleter(MoveDeleter&&) {};
+    MoveDeleter(MoveDeleter&&) {}
 
     explicit MoveDeleter(int) {}
 
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp
index 6d66e05e426b462..e46a91ec375cfd6 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer_deleter_allocator.pass.cpp
@@ -53,7 +53,7 @@ class MoveDeleter
     MoveDeleter();
     MoveDeleter(MoveDeleter const&);
 public:
-    MoveDeleter(MoveDeleter&&) {};
+    MoveDeleter(MoveDeleter&&) {}
 
     explicit MoveDeleter(int) {}
 
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.lwg2070.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.lwg2070.pass.cpp
index bf86327848d2ee9..72d88998bbf7af7 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.lwg2070.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.lwg2070.pass.cpp
@@ -43,7 +43,7 @@ struct MyAllocator {
   MyAllocator(int i) : id(i) {}
 
   template <class U>
-  MyAllocator(MyAllocator<U> const& other) : id(other.id){};
+  MyAllocator(MyAllocator<U> const& other) : id(other.id){}
 
   pointer allocate(std::ptrdiff_t n) {
     return pointer(static_cast<T*>(::operator new(n * sizeof(T))));
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.compile.fail.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.compile.fail.cpp
index fec160a9854db03..9bc3c29b04a0560 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.compile.fail.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.private.compile.fail.cpp
@@ -20,7 +20,7 @@
 
 struct S {
 private:
-   S () {};  // ctor is private
+   S () {}  // ctor is private
 };
 
 int main(int, char**)
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/op_bool.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/op_bool.pass.cpp
index d8c067c7be8e7ab..a1f8093d8154a83 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/op_bool.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.obs/op_bool.pass.cpp
@@ -20,7 +20,7 @@
 
 struct A {
   int a;
-  virtual ~A(){};
+  virtual ~A(){}
 };
 struct B : A {};
 
diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp
index 581ec33320bd296..1a07dcd446aa091 100644
--- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp
+++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp
@@ -23,13 +23,13 @@
 
 struct Derived : ConstexprTestTypes::MoveOnly {
   Derived() = default;
-  TEST_CONSTEXPR_CXX20 Derived(ConstexprTestTypes::MoveOnly&&){};
+  TEST_CONSTEXPR_CXX20 Derived(ConstexprTestTypes::MoveOnly&&){}
 };
 struct CountAssign {
   int copied = 0;
   int moved = 0;
   TEST_CONSTEXPR_CXX20 CountAssign() = default;
-  TEST_CONSTEXPR_CXX20 CountAssign(const int){};
+  TEST_CONSTEXPR_CXX20 CountAssign(const int){}
   TEST_CONSTEXPR_CXX20 CountAssign& operator=(CountAssign const&) {
     ++copied;
     return *this;

>From 5b832d465e0651f98e393d083134ec8c27b1ee85 Mon Sep 17 00:00:00 2001
From: "Stephan T. Lavavej" <stl at nuwen.net>
Date: Fri, 24 Nov 2023 21:12:05 -0800
Subject: [PATCH 2/5] Cleanup comment typos.

---
 .../alg.modifying.operations/copy_move_nontrivial.pass.cpp  | 4 ++--
 ...robust_against_customization_points_not_working.pass.cpp | 2 +-
 .../views/mdspan/layout_stride/assert.conversion.pass.cpp   | 2 +-
 .../diagnostics/bit.nodiscard_extensions.compile.pass.cpp   | 2 +-
 .../chrono.nodiscard_extensions.compile.pass.cpp            | 2 +-
 .../format.nodiscard_extensions.compile.pass.cpp            | 2 +-
 .../diagnostics/pstl.nodiscard_extensions.compile.pass.cpp  | 2 +-
 .../ranges.nodiscard_extensions.compile.pass.cpp            | 2 +-
 .../construct_piecewise_pair.pass.cpp                       | 4 ++--
 .../stress_tests/stress_test_variant_overloads_impl.sh.cpp  | 2 +-
 .../construct_piecewise_pair.pass.cpp                       | 4 ++--
 .../alg.remove/ranges.remove.pass.cpp                       | 4 ++--
 .../alg.transform/ranges.transform.binary.iterator.pass.cpp | 2 +-
 .../alg.transform/ranges.transform.binary.range.pass.cpp    | 2 +-
 .../algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp    | 2 +-
 .../alg.nonmodifying/alg.foreach/ranges.for_each_n.pass.cpp | 2 +-
 .../alg.partitions/ranges.is_partitioned.pass.cpp           | 2 +-
 .../std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp  | 2 +-
 .../concepts/concepts.object/semiregular.compile.pass.cpp   | 2 +-
 libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h | 2 +-
 .../containers/views/mdspan/extents/CtorTestCombinations.h  | 2 +-
 .../containers/views/mdspan/extents/ctor_default.pass.cpp   | 2 +-
 .../test/std/containers/views/mdspan/mdspan/types.pass.cpp  | 2 +-
 .../experimental/simd/simd.class/simd_ctor_default.pass.cpp | 2 +-
 .../simd/simd.mask.class/simd_mask_ctor_default.pass.cpp    | 2 +-
 .../test/std/input.output/syncstream/syncbuf/sputc.pass.cpp | 6 +++---
 .../test/std/input.output/syncstream/syncbuf/sputn.pass.cpp | 6 +++---
 .../syncbuf/syncstream.syncbuf.assign/assign.pass.cpp       | 2 +-
 .../numarray/class.gslice/gslice.cons/default.pass.cpp      | 2 +-
 .../class.gslice/gslice.cons/start_size_stride.pass.cpp     | 2 +-
 .../std/ranges/range.adaptors/range.reverse/begin.pass.cpp  | 2 +-
 .../ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp | 6 +++---
 .../range.factories/range.repeat.view/views_repeat.pass.cpp | 2 +-
 .../std/re/re.const/re.matchflag/match_flag_type.pass.cpp   | 2 +-
 .../std/re/re.const/re.synopt/syntax_option_type.pass.cpp   | 2 +-
 .../common_type_specialization.pass.cpp                     | 2 +-
 .../thread.lock.shared.cons/mutex_duration.pass.cpp         | 4 ++--
 libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp  | 2 +-
 libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp   | 2 +-
 .../time.zone.db.list/erase_after.compile.pass.cpp          | 2 +-
 .../expected/expected.expected/assign/assign.U.pass.cpp     | 2 +-
 .../format.formattable/concept.formattable.compile.pass.cpp | 2 +-
 .../format.context/format.context/ctor.pass.cpp             | 4 ++--
 .../format.context/format.context/locale.pass.cpp           | 2 +-
 .../format/format.functions/escaped_output.ascii.pass.cpp   | 4 ++--
 .../format/format.functions/escaped_output.unicode.pass.cpp | 4 ++--
 .../std/utilities/format/format.functions/format_tests.h    | 6 +++---
 .../util.smartptr.enab/enable_shared_from_this.pass.cpp     | 2 +-
 .../unique.ptr.class/unique.ptr.asgn/move.pass.cpp          | 2 +-
 .../tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp     | 4 ++--
 libcxx/test/support/assert_macros.h                         | 2 +-
 libcxx/test/support/boolean_testable.h                      | 2 +-
 libcxx/test/support/concat_macros.h                         | 2 +-
 libcxx/test/support/copy_move_types.h                       | 4 ++--
 libcxx/test/support/iterator_traits_cpp17_iterators.h       | 4 ++--
 libcxx/test/support/test_container_comparisons.h            | 2 +-
 56 files changed, 75 insertions(+), 75 deletions(-)

diff --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp
index 15f99a56ad1c364..0c5ae84d97700b0 100644
--- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy_move_nontrivial.pass.cpp
@@ -302,10 +302,10 @@ constexpr bool test() {
   // Copying from `bool` to `char` will invoke the optimization, so only check one direction.
   test_copy_and_move<char, bool>();
 
-  // Copying between different structs with the same represenation (there is no way to guarantee the representation is
+  // Copying between different structs with the same representation (there is no way to guarantee the representation is
   // the same).
   test_copy_and_move<S1, S2>();
-  // Copying between different unions with the same represenation.
+  // Copying between different unions with the same representation.
   test_copy_and_move<U1, U2>();
 
   // Copying from a regular pointer to a void pointer (these are not considered trivially copyable).
diff --git a/libcxx/test/libcxx/algorithms/pstl.robust_against_customization_points_not_working.pass.cpp b/libcxx/test/libcxx/algorithms/pstl.robust_against_customization_points_not_working.pass.cpp
index 25aed98fe136683..09258f7c9eb5635 100644
--- a/libcxx/test/libcxx/algorithms/pstl.robust_against_customization_points_not_working.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/pstl.robust_against_customization_points_not_working.pass.cpp
@@ -9,7 +9,7 @@
 // UNSUPPORTED: c++03, c++11, c++14
 // UNSUPPORTED: libcpp-has-no-incomplete-pstl
 
-// Having a customization point outside the module doesn't work, so this test is inherintly module-hostile.
+// Having a customization point outside the module doesn't work, so this test is inherently module-hostile.
 // UNSUPPORTED: clang-modules-build
 
 // Make sure that the customization points get called properly when overloaded
diff --git a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp
index 24b5ff903c10b91..8bfc865f2b5f5b7 100644
--- a/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp
@@ -101,7 +101,7 @@ int main(int, char**) {
         ([=] { std::layout_stride::template mapping<std::extents<signed char, D, 10>> m(arg); }()),
         "layout_stride::mapping converting ctor: other.required_span_size() must be representable as index_type.");
   }
-  // base offset must be 0 (i.e. mapping(0,...,0)==0) for a strided layout with positiv strides
+  // base offset must be 0 (i.e. mapping(0,...,0)==0) for a strided layout with positive strides
   {
     always_convertible_layout::mapping<std::dextents<int, 2>> offset_map(std::dextents<int, 2>{10, 10}, 3);
     TEST_LIBCPP_ASSERT_FAILURE(
diff --git a/libcxx/test/libcxx/diagnostics/bit.nodiscard_extensions.compile.pass.cpp b/libcxx/test/libcxx/diagnostics/bit.nodiscard_extensions.compile.pass.cpp
index a1400336cefde2e..16ca0b68ceb0aa0 100644
--- a/libcxx/test/libcxx/diagnostics/bit.nodiscard_extensions.compile.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/bit.nodiscard_extensions.compile.pass.cpp
@@ -11,7 +11,7 @@
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_NODISCARD_EXT
 
 // Check that <bit> functions aren't marked [[nodiscard]] when
-// _LIBCPP_DISBALE_NODISCARD_EXT is defined
+// _LIBCPP_DISABLE_NODISCARD_EXT is defined
 
 #include <bit>
 
diff --git a/libcxx/test/libcxx/diagnostics/chrono.nodiscard_extensions.compile.pass.cpp b/libcxx/test/libcxx/diagnostics/chrono.nodiscard_extensions.compile.pass.cpp
index 95b18eba26e7750..1f30af06fedd879 100644
--- a/libcxx/test/libcxx/diagnostics/chrono.nodiscard_extensions.compile.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/chrono.nodiscard_extensions.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Check that format functions aren't marked [[nodiscard]] when
-// _LIBCPP_DISBALE_NODISCARD_EXT is defined
+// _LIBCPP_DISABLE_NODISCARD_EXT is defined
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-filesystem, no-localization, no-tzdb
diff --git a/libcxx/test/libcxx/diagnostics/format.nodiscard_extensions.compile.pass.cpp b/libcxx/test/libcxx/diagnostics/format.nodiscard_extensions.compile.pass.cpp
index d443687bac338d6..b4f2415872ca87c 100644
--- a/libcxx/test/libcxx/diagnostics/format.nodiscard_extensions.compile.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/format.nodiscard_extensions.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Check that format functions aren't marked [[nodiscard]] when
-// _LIBCPP_DISBALE_NODISCARD_EXT is defined
+// _LIBCPP_DISABLE_NODISCARD_EXT is defined
 
 // TODO FMT This test should not require std::to_chars(floating-point)
 // XFAIL: availability-fp_to_chars-missing
diff --git a/libcxx/test/libcxx/diagnostics/pstl.nodiscard_extensions.compile.pass.cpp b/libcxx/test/libcxx/diagnostics/pstl.nodiscard_extensions.compile.pass.cpp
index 546433df5a4d608..01e228c09cc3bbb 100644
--- a/libcxx/test/libcxx/diagnostics/pstl.nodiscard_extensions.compile.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/pstl.nodiscard_extensions.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Check that PSTL algorithms aren't marked [[nodiscard]] when
-// _LIBCPP_DISBALE_NODISCARD_EXT is defined
+// _LIBCPP_DISABLE_NODISCARD_EXT is defined
 
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_NODISCARD_EXT
 
diff --git a/libcxx/test/libcxx/diagnostics/ranges.nodiscard_extensions.compile.pass.cpp b/libcxx/test/libcxx/diagnostics/ranges.nodiscard_extensions.compile.pass.cpp
index 5ec227311472e86..7e2d64b8c9b6186 100644
--- a/libcxx/test/libcxx/diagnostics/ranges.nodiscard_extensions.compile.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/ranges.nodiscard_extensions.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Check that ranges algorithms aren't marked [[nodiscard]] when
-// _LIBCPP_DISBALE_NODISCARD_EXT is defined
+// _LIBCPP_DISABLE_NODISCARD_EXT is defined
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 
diff --git a/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp
index 728762cf0faab31..be9909c91d77b92 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp
@@ -21,7 +21,7 @@
 // void polymorphic_allocator<T>::construct(pair<T1, T2>*, piecewise_construct_t
 //                                          tuple<Args1...> x, tuple<Args2...>)
 
-// The stardard specifiers a tranformation to uses-allocator construction as
+// The standard specifies a transformation to uses-allocator construction as
 // follows:
 //  - If uses_allocator_v<T1,memory_resource*> is false and
 //      is_constructible_v<T,Args1...> is true, then xprime is x.
@@ -36,7 +36,7 @@
 //
 // The use of "xprime = tuple_cat(..., std::move(x), ...)" causes all of the
 // objects in 'x' to be copied into 'xprime'. If 'x' contains any types which
-// are stored by value this causes an unessary copy to occur. To prevent this
+// are stored by value this causes an unnecessary copy to occur. To prevent this
 //  libc++ changes this call into
 // "xprime = forward_as_tuple(..., std::get<Idx>(std::move(x))..., ...)".
 // 'xprime' contains references to the values in 'x' instead of copying them.
diff --git a/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp b/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp
index 58b9db45d37a2a4..d37f1a4bfac519b 100644
--- a/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp
+++ b/libcxx/test/libcxx/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp
@@ -99,7 +99,7 @@ using Overloads = Overload<Types...>;
 namespace variant_impl {
   template <class ...Types>
   using Overloads = std::__variant_detail::_MakeOverloads<Types...>;
-} // naamespace variant_impl
+} // namespace variant_impl
 
 #ifndef TEST_NS
 #error TEST_NS must be defined
diff --git a/libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp b/libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp
index 916f9c31d4e9025..55a51c9fc26e848 100644
--- a/libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp
+++ b/libcxx/test/libcxx/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_piecewise_pair.pass.cpp
@@ -21,7 +21,7 @@
 // void polymorphic_allocator<T>::construct(pair<T1, T2>*, piecewise_construct_t
 //                                          tuple<Args1...> x, tuple<Args2...>)
 
-// The stardard specifiers a tranformation to uses-allocator construction as
+// The standard specifies a transformation to uses-allocator construction as
 // follows:
 //  - If uses_allocator_v<T1,memory_resource*> is false and
 //      is_constructible_v<T,Args1...> is true, then xprime is x.
@@ -36,7 +36,7 @@
 //
 // The use of "xprime = tuple_cat(..., std::move(x), ...)" causes all of the
 // objects in 'x' to be copied into 'xprime'. If 'x' contains any types which
-// are stored by value this causes an unessary copy to occur. To prevent this
+// are stored by value this causes an unnecessary copy to occur. To prevent this
 //  libc++ changes this call into
 // "xprime = forward_as_tuple(..., std::get<Idx>(std::move(x))..., ...)".
 // 'xprime' contains references to the values in 'x' instead of copying them.
diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp
index 319259913cc3293..96387b2adfb7787 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp
@@ -35,7 +35,7 @@ static_assert(!HasRemoveIt<PermutableNotForwardIterator>);
 static_assert(!HasRemoveIt<PermutableNotSwappable>);
 static_assert(!HasRemoveIt<int*, SentinelForNotSemiregular>);
 static_assert(!HasRemoveIt<int*, SentinelForNotWeaklyEqualityComparableWith>);
-static_assert(!HasRemoveIt<int**>); // not indirect_binary_prediacte
+static_assert(!HasRemoveIt<int**>); // not indirect_binary_predicate
 
 template <class Range>
 concept HasRemoveR = requires(Range range) { std::ranges::remove(range, 0); };
@@ -45,7 +45,7 @@ static_assert(!HasRemoveR<PermutableRangeNotForwardIterator>);
 static_assert(!HasRemoveR<PermutableRangeNotSwappable>);
 static_assert(!HasRemoveR<SentinelForNotSemiregular>);
 static_assert(!HasRemoveR<SentinelForNotWeaklyEqualityComparableWith>);
-static_assert(!HasRemoveR<UncheckedRange<int**>>); // not indirect_binary_prediacte
+static_assert(!HasRemoveR<UncheckedRange<int**>>); // not indirect_binary_predicate
 
 template <int N, int M>
 struct Data {
diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp
index 94209020e35e0ed..b604263e525d272 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp
@@ -19,7 +19,7 @@
 //     ranges::transform(I1 first1, S1 last1, I2 first2, S2 last2, O result,
 //                       F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {});
 
-// The range overloads are tested in ranges.tranform.binary.range.pass.cpp.
+// The range overloads are tested in ranges.transform.binary.range.pass.cpp.
 
 #include <algorithm>
 #include <array>
diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp
index bebe4561bd579c6..cc7c78bd3ad3282 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp
@@ -18,7 +18,7 @@
 //     ranges::transform(R1&& r1, R2&& r2, O result,
 //                       F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {});
 
-// The iterator overloads are tested in ranges.tranform.binary.iterator.pass.cpp.
+// The iterator overloads are tested in ranges.transform.binary.iterator.pass.cpp.
 
 #include <algorithm>
 #include <array>
diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp
index faf597c970ff23a..e28cbe2a08de4ab 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp
@@ -18,7 +18,7 @@
 //   constexpr bool     // constexpr after c++17
 //   equal(Iter1 first1, Iter1 last1, Iter2 first2, Iter2 last2);
 
-// We test the cartesian product, so we somethimes compare differently signed types
+// We test the cartesian product, so we sometimes compare differently signed types
 // ADDITIONAL_COMPILE_FLAGS: -Wno-sign-compare
 
 #include <algorithm>
diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each_n.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each_n.pass.cpp
index 9641411ef2b2e30..913819979ca1cda 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each_n.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each_n.pass.cpp
@@ -57,7 +57,7 @@ constexpr void test_iterator() {
     assert(i == 4);
   }
 
-  { // check that an emptry range works
+  { // check that an empty range works
     int a[] = {};
     std::ranges::for_each_n(Iter(a), 0, [](auto&) { assert(false); });
   }
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.partitions/ranges.is_partitioned.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.partitions/ranges.is_partitioned.pass.cpp
index 9795d1eb2b85b4a..72b58f5534140bf 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.partitions/ranges.is_partitioned.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.partitions/ranges.is_partitioned.pass.cpp
@@ -87,7 +87,7 @@ constexpr void test_iterators() {
     }
   }
 
-  { // check that it's partitoned if the predicate is true for all elements
+  { // check that it's partitioned if the predicate is true for all elements
     {
       int a[] = {1, 2, 3, 4};
       auto ret = std::ranges::is_partitioned(Iter(a), Sent(Iter(a + 4)), [](int) { return true; });
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
index ed26c5b861f5a25..554bd8982ab3331 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
@@ -190,7 +190,7 @@ test_pointer_sort()
 
 // test_adversarial_quicksort generates a vector with values arranged in such a
 // way that they would invoke O(N^2) behavior on any quick sort implementation
-// that satisifies certain conditions.  Details are available in the following
+// that satisfies certain conditions.  Details are available in the following
 // paper:
 // "A Killer Adversary for Quicksort", M. D. McIlroy, Software-Practice &
 // Experience Volume 29 Issue 4 April 10, 1999 pp 341-344.
diff --git a/libcxx/test/std/concepts/concepts.object/semiregular.compile.pass.cpp b/libcxx/test/std/concepts/concepts.object/semiregular.compile.pass.cpp
index 7151c1c8bb31d40..6d798b264678ef9 100644
--- a/libcxx/test/std/concepts/concepts.object/semiregular.compile.pass.cpp
+++ b/libcxx/test/std/concepts/concepts.object/semiregular.compile.pass.cpp
@@ -107,7 +107,7 @@ static_assert(!std::semiregular<has_rvalue_reference_member>);
 static_assert(!std::semiregular<has_function_ref_member>);
 static_assert(!std::semiregular<deleted_assignment_from_const_rvalue>);
 
-// Not default_initialzable
+// Not default_initializable
 static_assert(!std::semiregular<std::runtime_error>);
 static_assert(
     !std::semiregular<std::tuple<std::runtime_error, std::overflow_error> >);
diff --git a/libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h b/libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h
index 7de8acc1fbf8481..b918c66f380fa9b 100644
--- a/libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h
+++ b/libcxx/test/std/containers/views/mdspan/CustomTestLayouts.h
@@ -35,7 +35,7 @@
 // - is_strided and is_unique are true if all extents are smaller than Wrap
 // - not default constructible
 // - not extents constructible
-// - not trivally copyable
+// - not trivially copyable
 // - does not check dynamic to static extent conversion in converting ctor
 // - check via side-effects that mdspan::swap calls mappings swap via ADL
 
diff --git a/libcxx/test/std/containers/views/mdspan/extents/CtorTestCombinations.h b/libcxx/test/std/containers/views/mdspan/extents/CtorTestCombinations.h
index 02731f8895ed8fa..5ad841f16939a6b 100644
--- a/libcxx/test/std/containers/views/mdspan/extents/CtorTestCombinations.h
+++ b/libcxx/test/std/containers/views/mdspan/extents/CtorTestCombinations.h
@@ -17,7 +17,7 @@
 #include "../ConvertibleToIntegral.h"
 #include "test_macros.h"
 
-// Helper file to implement combinatorical testing of extents constructor
+// Helper file to implement combinatorial testing of extents constructor
 //
 // std::extents can be constructed from just indices, a std::array, or a std::span
 // In each of those cases one can either provide all extents, or just the dynamic ones
diff --git a/libcxx/test/std/containers/views/mdspan/extents/ctor_default.pass.cpp b/libcxx/test/std/containers/views/mdspan/extents/ctor_default.pass.cpp
index d958ee8f8371b41..105eb7d7ee6e45c 100644
--- a/libcxx/test/std/containers/views/mdspan/extents/ctor_default.pass.cpp
+++ b/libcxx/test/std/containers/views/mdspan/extents/ctor_default.pass.cpp
@@ -14,7 +14,7 @@
 // constexpr extents() noexcept = default;
 //
 // Remarks: since the standard uses an exposition only array member, dynamic extents
-// need to be zero intialized!
+// need to be zero initialized!
 
 #include <mdspan>
 #include <cassert>
diff --git a/libcxx/test/std/containers/views/mdspan/mdspan/types.pass.cpp b/libcxx/test/std/containers/views/mdspan/mdspan/types.pass.cpp
index e99f8a3c524a8bb..2dea5a82b65169a 100644
--- a/libcxx/test/std/containers/views/mdspan/mdspan/types.pass.cpp
+++ b/libcxx/test/std/containers/views/mdspan/mdspan/types.pass.cpp
@@ -39,7 +39,7 @@
 #include "../CustomTestLayouts.h"
 
 // Calculated expected size of an mdspan
-// Note this expectes that only default_accessor is empty
+// Note this expects that only default_accessor is empty
 template<class MDS>
 constexpr size_t expected_size() {
   size_t sizeof_dht = sizeof(typename MDS::data_handle_type);
diff --git a/libcxx/test/std/experimental/simd/simd.class/simd_ctor_default.pass.cpp b/libcxx/test/std/experimental/simd/simd.class/simd_ctor_default.pass.cpp
index 697a947f2fa4f36..22105c6dd397172 100644
--- a/libcxx/test/std/experimental/simd/simd.class/simd_ctor_default.pass.cpp
+++ b/libcxx/test/std/experimental/simd/simd.class/simd_ctor_default.pass.cpp
@@ -19,7 +19,7 @@
 namespace ex = std::experimental::parallelism_v2;
 
 // See https://www.open-std.org/jtc1/sc22/WG21/docs/papers/2019/n4808.pdf
-// Default intialization performs no initialization of the elements; value-initialization initializes each element with T().
+// Default initialization performs no initialization of the elements; value-initialization initializes each element with T().
 // Thus, default initialization leaves the elements in an indeterminate state.
 template <class T, std::size_t>
 struct CheckSimdDefaultCtor {
diff --git a/libcxx/test/std/experimental/simd/simd.mask.class/simd_mask_ctor_default.pass.cpp b/libcxx/test/std/experimental/simd/simd.mask.class/simd_mask_ctor_default.pass.cpp
index 8401e7efd3824e2..3a63cdeb9451d84 100644
--- a/libcxx/test/std/experimental/simd/simd.mask.class/simd_mask_ctor_default.pass.cpp
+++ b/libcxx/test/std/experimental/simd/simd.mask.class/simd_mask_ctor_default.pass.cpp
@@ -19,7 +19,7 @@
 namespace ex = std::experimental::parallelism_v2;
 
 // See https://www.open-std.org/jtc1/sc22/WG21/docs/papers/2019/n4808.pdf
-// Default intialization performs no initialization of the elements; value-initialization initializes each element with T().
+// Default initialization performs no initialization of the elements; value-initialization initializes each element with T().
 // Thus, default initialization leaves the elements in an indeterminate state.
 template <class T, std::size_t>
 struct CheckSimdMaskDefaultCtor {
diff --git a/libcxx/test/std/input.output/syncstream/syncbuf/sputc.pass.cpp b/libcxx/test/std/input.output/syncstream/syncbuf/sputc.pass.cpp
index 6812e0abb5924fc..953b783c3a0acde 100644
--- a/libcxx/test/std/input.output/syncstream/syncbuf/sputc.pass.cpp
+++ b/libcxx/test/std/input.output/syncstream/syncbuf/sputc.pass.cpp
@@ -67,7 +67,7 @@ void test() {
         typename SyncBuf::int_type ret = sync_buf.sputc(c);
         assert(ret == typename SyncBuf::int_type(c));
       }
-      // The synchchronization happens upon destruction of sync_buf.
+      // The synchronization happens upon destruction of sync_buf.
       assert(buf.str().empty());
       assert(stats.allocated_size >= 1024);
     }
@@ -92,7 +92,7 @@ void test() {
         ret = new_sync_buf.sputc(c);
         assert(ret == typename SyncBuf::int_type(c));
 
-        // The synchchronization happens upon destruction of new_sync_buf.
+        // The synchronization happens upon destruction of new_sync_buf.
         assert(buf.str().empty());
         assert(stats.allocated_size >= 2);
       }
@@ -129,7 +129,7 @@ void test() {
         ret = new_sync_buf.sputc(c);
         assert(ret == typename SyncBuf::int_type(c));
 
-        // The synchchronization happens upon destruction of new_sync_buf.
+        // The synchronization happens upon destruction of new_sync_buf.
         assert(buf.str().empty());
       }
       assert(buf.str().size() == 2);
diff --git a/libcxx/test/std/input.output/syncstream/syncbuf/sputn.pass.cpp b/libcxx/test/std/input.output/syncstream/syncbuf/sputn.pass.cpp
index d706010843d62af..2e90e487430690e 100644
--- a/libcxx/test/std/input.output/syncstream/syncbuf/sputn.pass.cpp
+++ b/libcxx/test/std/input.output/syncstream/syncbuf/sputn.pass.cpp
@@ -66,7 +66,7 @@ void test() {
       std::streamsize ret = sync_buf.sputn(expected.data(), expected.size());
       assert(ret == 1024);
 
-      // The synchchronization happens upon destruction of sync_buf.
+      // The synchronization happens upon destruction of sync_buf.
       assert(buf.str().empty());
       assert(stats.allocated_size >= 1024);
     }
@@ -87,7 +87,7 @@ void test() {
         ret = new_sync_buf.sputn(expected.data(), expected.size());
         assert(ret == 1024);
 
-        // The synchchronization happens upon destruction of new_sync_buf.
+        // The synchronization happens upon destruction of new_sync_buf.
         assert(buf.str().empty());
         assert(stats.allocated_size >= 2048);
       }
@@ -116,7 +116,7 @@ void test() {
         ret = new_sync_buf.sputn(expected.data(), expected.size());
         assert(ret == 1024);
 
-        // The synchchronization happens upon destruction of new_sync_buf.
+        // The synchronization happens upon destruction of new_sync_buf.
         assert(buf.str().empty());
       }
       assert(buf.str() == expected + expected);
diff --git a/libcxx/test/std/input.output/syncstream/syncbuf/syncstream.syncbuf.assign/assign.pass.cpp b/libcxx/test/std/input.output/syncstream/syncbuf/syncstream.syncbuf.assign/assign.pass.cpp
index f2309075717eb12..dd6dd32d73ac53a 100644
--- a/libcxx/test/std/input.output/syncstream/syncbuf/syncstream.syncbuf.assign/assign.pass.cpp
+++ b/libcxx/test/std/input.output/syncstream/syncbuf/syncstream.syncbuf.assign/assign.pass.cpp
@@ -70,7 +70,7 @@ class test_syncbuf : public std::basic_syncbuf<T, std::char_traits<T>, Alloc> {
 
 // Helper wrapper to inspect the internal state of the basic_syncbuf
 //
-// This is used the valiate some standard requirements and libc++
+// This is used to validate some standard requirements and libc++
 // implementation details.
 template <class CharT, class Traits, class Allocator>
 class syncbuf_inspector : public std::basic_syncbuf<CharT, Traits, Allocator> {
diff --git a/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/default.pass.cpp b/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/default.pass.cpp
index 9d9a7fcb9a23122..8398f1132edff16 100644
--- a/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/default.pass.cpp
+++ b/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/default.pass.cpp
@@ -8,7 +8,7 @@
 
 // <valarray>
 
-// class glice;
+// class gslice;
 
 // gslice();
 
diff --git a/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/start_size_stride.pass.cpp b/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/start_size_stride.pass.cpp
index 1e11213d109bba4..a91bd5149eaa4d4 100644
--- a/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/start_size_stride.pass.cpp
+++ b/libcxx/test/std/numerics/numarray/class.gslice/gslice.cons/start_size_stride.pass.cpp
@@ -8,7 +8,7 @@
 
 // <valarray>
 
-// class glice;
+// class gslice;
 
 // gslice(size_t start, const valarray<size_t>& size,
 //                      const valarray<size_t>& stride);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.reverse/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.reverse/begin.pass.cpp
index 667cd348158ac99..99c1419559ae05d 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.reverse/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.reverse/begin.pass.cpp
@@ -115,7 +115,7 @@ constexpr bool test() {
     ASSERT_SAME_TYPE(decltype(std::move(rev).begin()), std::reverse_iterator<bidirectional_iterator<int*>>);
   }
   // Non-common random access range.
-  // Note: const overload invalid for non-common ranges, though it would not be imposible
+  // Note: const overload invalid for non-common ranges, though it would not be impossible
   // to implement for random access ranges.
   {
     auto rev = std::ranges::reverse_view(RASentRange{buffer, buffer + 8});
diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp
index c4c85bc24e1e878..e46ab4c38d2b6b5 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp
@@ -154,9 +154,9 @@ constexpr bool test() {
   }
 
   {
-    // const imcompatible:
-    // underlying const sentinels cannot substract underlying iterators
-    // underlying sentinels cannot substract underlying const iterators
+    // const incompatible:
+    // underlying const sentinels cannot subtract underlying iterators
+    // underlying sentinels cannot subtract underlying const iterators
     std::ranges::zip_view v(NonSimpleForwardSizedNonCommon{buffer1});
     static_assert(!std::ranges::common_range<decltype(v)>);
     LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<decltype(v)>);
diff --git a/libcxx/test/std/ranges/range.factories/range.repeat.view/views_repeat.pass.cpp b/libcxx/test/std/ranges/range.factories/range.repeat.view/views_repeat.pass.cpp
index c174850c4009846..9cbe505621b9892 100644
--- a/libcxx/test/std/ranges/range.factories/range.repeat.view/views_repeat.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.repeat.view/views_repeat.pass.cpp
@@ -11,7 +11,7 @@
 // template <class T>
 // views::repeat(T &&) requires constructible_from<ranges::repeat_view<T>, T>;
 
-// templaye <class T, class Bound>
+// template <class T, class Bound>
 // views::repeat(T &&, Bound &&) requires constructible_from<ranges::repeat_view<T, Bound>, T, Bound>;
 
 #include <cassert>
diff --git a/libcxx/test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp b/libcxx/test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp
index 242195c25d54af2..b631b49c9a8e16d 100644
--- a/libcxx/test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp
+++ b/libcxx/test/std/re/re.const/re.matchflag/match_flag_type.pass.cpp
@@ -11,7 +11,7 @@
 // namespace regex_constants
 // {
 //
-// emum match_flag_type  // bitmask type
+// enum match_flag_type  // bitmask type
 // {
 //     match_default     = 0,
 //     match_not_bol     = unspecified,
diff --git a/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp b/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp
index 012ad4fe855dc76..4e2ddb798ba9e3c 100644
--- a/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp
+++ b/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp
@@ -11,7 +11,7 @@
 // namespace regex_constants
 // {
 //
-// emum syntax_option_type  // bitmask type
+// enum syntax_option_type  // bitmask type
 // {
 //     icase      = unspecified,
 //     nosubs     = unspecified,
diff --git a/libcxx/test/std/strings/string.view/string.view.comparison/common_type_specialization.pass.cpp b/libcxx/test/std/strings/string.view/string.view.comparison/common_type_specialization.pass.cpp
index ef120cbcff1785b..91dde6e17c2b584 100644
--- a/libcxx/test/std/strings/string.view/string.view.comparison/common_type_specialization.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.comparison/common_type_specialization.pass.cpp
@@ -10,7 +10,7 @@
 
 // During the review D130295 it was noticed libc++'s implementation uses
 // std::common_type. When users specialize this template for their own types the
-// comparisions would fail. This tests with a specialized std::common_type.
+// comparisons would fail. This tests with a specialized std::common_type.
 
 // <string_view>
 
diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp
index 07963a4ee1d519f..e5c8caf4a07adc7 100644
--- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp
+++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp
@@ -46,9 +46,9 @@ std::atomic<unsigned> CountDown(Threads);
 void f1()
 {
   // Preemptive scheduling means that one cannot make assumptions about when
-  // code executes and therefore we cannot assume anthing about when the mutex
+  // code executes and therefore we cannot assume anything about when the mutex
   // starts waiting relative to code in the main thread. We can however prove
-  // that a timeout occured and that implies that this code is waiting.
+  // that a timeout occurred and that implies that this code is waiting.
   // See f2() below.
   //
   // Nevertheless, we should at least try to ensure that the mutex waits and
diff --git a/libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp b/libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp
index dceb6ac9ae38f94..aec6e78d994da94 100644
--- a/libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp
@@ -901,7 +901,7 @@ static void test_valid_values_date_time() {
 template <class CharT>
 static void test_valid_values_time_zone() {
 // The Apple CI gives %z='-0700'	%Ez='-0700'	%Oz='-0700'	%Z='UTC'
-// -0700 looks like the local time where the CI happens to recide, therefore
+// -0700 looks like the local time where the CI happens to reside, therefore
 // omit this test on Apple.
 // The Windows CI gives %z='-0000', but on local machines set to a different
 // timezone, it gives e.g. %z='+0200'.
diff --git a/libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp b/libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp
index 5bce6c1187619b5..ebc45c7e87351f3 100644
--- a/libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp
+++ b/libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp
@@ -897,7 +897,7 @@ static void test_valid_values_date_time() {
 template <class CharT>
 static void test_valid_values_time_zone() {
 // The Apple CI gives %z='-0700'	%Ez='-0700'	%Oz='-0700'	%Z='UTC'
-// -0700 looks like the local time where the CI happens to recide, therefore
+// -0700 looks like the local time where the CI happens to reside, therefore
 // omit this test on Apple.
 // The Windows CI gives %z='-0000', but on local machines set to a different
 // timezone, it gives e.g. %z='+0200'.
diff --git a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/erase_after.compile.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/erase_after.compile.pass.cpp
index a410dd69c225ce8..b6844786b489a28 100644
--- a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/erase_after.compile.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.list/erase_after.compile.pass.cpp
@@ -22,7 +22,7 @@
 //   Preconditions: The iterator following p is dereferenceable.
 //
 // Since there is no Standard way to create a second entry it's not
-// possible to fullfill this precondition. This is tested in a libc++
+// possible to fulfill this precondition. This is tested in a libc++
 // specific test.
 
 #include <chrono>
diff --git a/libcxx/test/std/utilities/expected/expected.expected/assign/assign.U.pass.cpp b/libcxx/test/std/utilities/expected/expected.expected/assign/assign.U.pass.cpp
index f9d07a76326653f..1c8750b7acd100a 100644
--- a/libcxx/test/std/utilities/expected/expected.expected/assign/assign.U.pass.cpp
+++ b/libcxx/test/std/utilities/expected/expected.expected/assign/assign.U.pass.cpp
@@ -52,7 +52,7 @@ static_assert(std::is_assignable_v<std::expected<int, int>&, int>);
 static_assert(std::is_assignable_v<std::expected<int, int>&, std::expected<int, int>>);
 
 // remove_cvref_t<U> is a specialization of unexpected
-// it is true because it covered the unepxected overload
+// it is true because it covered the unexpected overload
 static_assert(std::is_assignable_v<std::expected<int, int>&, std::unexpected<int>>);
 
 // !is_constructible_v<T, U>
diff --git a/libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp b/libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
index 1f16eeca20aca9f..fad5277fd6e1102 100644
--- a/libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
@@ -254,7 +254,7 @@ void test_P2286() {
   test_P2286_vector_bool<CharT, std::vector<bool, min_allocator<bool>>>();
 }
 
-// Tests volatile quified objects are no longer formattable.
+// Tests volatile qualified objects are no longer formattable.
 template <class CharT>
 void test_LWG3631() {
   assert_is_not_formattable<volatile CharT, CharT>();
diff --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp
index 5f2f6f1ae370ccb..4384f7b0fe68cfa 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp
@@ -14,7 +14,7 @@
 
 // <format>
 
-// The Standard does not specifiy a constructor
+// The Standard does not specify a constructor
 // basic_format_context(Out out,
 //                      basic_format_args<basic_format_context> args,
 //                      std::optional<std::::locale>&& loc = std::nullopt);
@@ -38,7 +38,7 @@ template <class OutIt, class CharT>
 void test() {
   std::basic_string<CharT> string = MAKE_STRING(CharT, "string");
   // The type of the object is an exposition only type. The temporary is needed
-  // to extend the lifetype of the object since args stores a pointer to the
+  // to extend the lifetime of the object since args stores a pointer to the
   // data in this object.
   auto format_arg_store = std::make_format_args<std::basic_format_context<OutIt, CharT>>(true, CharT('a'), 42, string);
   std::basic_format_args args = format_arg_store;
diff --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp
index edb0a01dc7b0b8e..5533fe1b9f280b5 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp
@@ -32,7 +32,7 @@ void test() {
   std::locale fr_FR{LOCALE_fr_FR_UTF_8};
   std::basic_string<CharT> string = MAKE_STRING(CharT, "string");
   // The type of the object is an exposition only type. The temporary is needed
-  // to extend the lifetype of the object since args stores a pointer to the
+  // to extend the lifetime of the object since args stores a pointer to the
   // data in this object.
   auto format_arg_store = std::make_format_args<std::basic_format_context<OutIt, CharT>>(true, CharT('a'), 42, string);
   std::basic_format_args args = format_arg_store;
diff --git a/libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp b/libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp
index fdf644f505113b9..1d92c7c96c2a78c 100644
--- a/libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/escaped_output.ascii.pass.cpp
@@ -150,7 +150,7 @@ void test_char() {
   // *** P2286 examples ***
   test_format(SV("['\\'', '\"']"), SV("[{:?}, {:?}]"), CharT('\''), CharT('"'));
 
-  // *** Specical cases ***
+  // *** Special cases ***
   test_format(SV("'\\t'"), SV("{:?}"), CharT('\t'));
   test_format(SV("'\\n'"), SV("{:?}"), CharT('\n'));
   test_format(SV("'\\r'"), SV("{:?}"), CharT('\r'));
@@ -282,7 +282,7 @@ void test_string() {
 
   test_format(SV("[\"šŸ¤·šŸ»\u200dā™‚\ufe0f\"]"), SV("[{:?}]"), SV("šŸ¤·šŸ»ā€ā™‚ļø"));
 
-  // *** Specical cases ***
+  // *** Special cases ***
   test_format(SV(R"("\t\n\r\\'\" ")"), SV("{:?}"), SV("\t\n\r\\'\" "));
 
   // *** Printable ***
diff --git a/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp b/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp
index 8a83804aee233d2..5c6f86f742baafb 100644
--- a/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp
@@ -155,7 +155,7 @@ void test_char() {
   // *** P2286 examples ***
   test_format(SV("['\\'', '\"']"), SV("[{:?}, {:?}]"), CharT('\''), CharT('"'));
 
-  // *** Specical cases ***
+  // *** Special cases ***
   test_format(SV("'\\t'"), SV("{:?}"), CharT('\t'));
   test_format(SV("'\\n'"), SV("{:?}"), CharT('\n'));
   test_format(SV("'\\r'"), SV("{:?}"), CharT('\r'));
@@ -324,7 +324,7 @@ void test_string() {
 
   test_format(SV(R"(["šŸ¤·šŸ»\u{200d}ā™‚\u{fe0f}"])"), SV("[{:?}]"), SV("šŸ¤·šŸ»ā€ā™‚ļø"));
 
-  // *** Specical cases ***
+  // *** Special cases ***
   test_format(SV(R"("\t\n\r\\'\" ")"), SV("{:?}"), SV("\t\n\r\\'\" "));
 
   // *** Printable ***
diff --git a/libcxx/test/std/utilities/format/format.functions/format_tests.h b/libcxx/test/std/utilities/format/format.functions/format_tests.h
index 0a5c6649240d680..aa33c200caa9892 100644
--- a/libcxx/test/std/utilities/format/format.functions/format_tests.h
+++ b/libcxx/test/std/utilities/format/format.functions/format_tests.h
@@ -2990,7 +2990,7 @@ void format_test_pointer(TestFunction check, ExceptionTest check_exception) {
 
 template <class CharT, class TestFunction, class ExceptionTest>
 void format_test_handle(TestFunction check, ExceptionTest check_exception) {
-  // *** Valid permuatations ***
+  // *** Valid permutations ***
   check(SV("answer is '0xaaaa'"), SV("answer is '{}'"), status::foo);
   check(SV("answer is '0xaaaa'"), SV("answer is '{:x}'"), status::foo);
   check(SV("answer is '0XAAAA'"), SV("answer is '{:X}'"), status::foo);
@@ -3239,7 +3239,7 @@ void format_tests(TestFunction check, ExceptionTest check_exception) {
   if constexpr (modus == execution_modus::full)
     format_test_floating_point<CharT>(check, check_exception);
 
-  // *** Test pointer formater argument ***
+  // *** Test pointer formatter argument ***
   check(SV("hello 0x0"), SV("hello {}"), nullptr);
   check(SV("hello 0x42"), SV("hello {}"), reinterpret_cast<void*>(0x42));
   check(SV("hello 0x42"), SV("hello {}"), reinterpret_cast<const void*>(0x42));
@@ -3249,7 +3249,7 @@ void format_tests(TestFunction check, ExceptionTest check_exception) {
   // *** Test handle formatter argument ***
   format_test_handle<CharT>(check, check_exception);
 
-  // *** Test the interal buffer optimizations ***
+  // *** Test the internal buffer optimizations ***
   if constexpr (modus == execution_modus::full)
     format_test_buffer_optimizations<CharT>(check);
 }
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
index d6b4508f6deba02..7a09c3d8bc8228b 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
@@ -18,7 +18,7 @@
 //     shared_ptr<T> shared_from_this();
 //     shared_ptr<T const> shared_from_this() const;
 //     weak_ptr<T> weak_from_this() noexcept;                         // C++17
-//     weak_ptr<T const> weak_from_this() const noexecpt;             // C++17
+//     weak_ptr<T const> weak_from_this() const noexcept;             // C++17
 // };
 
 #include <memory>
diff --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp
index 9a21d46e0162b3e..80d75e721e52e53 100644
--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp
+++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.asgn/move.pass.cpp
@@ -8,7 +8,7 @@
 
 // UNSUPPORTED: c++03
 
-// Self assignement post-conditions are tested.
+// Self assignment post-conditions are tested.
 // ADDITIONAL_COMPILE_FLAGS: -Wno-self-move
 
 // <memory>
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp
index 027468395c43099..d38d23bc9158a38 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_UTypes.pass.cpp
@@ -40,8 +40,8 @@ struct DerivedFromAllocArgT : std::allocator_arg_t {};
 
 
 // Make sure the _Up... constructor SFINAEs out when the number of initializers
-// is less that the number of elements in the tuple. Previously libc++ would
-// offer these constructers as an extension but they broke conforming code.
+// is less than the number of elements in the tuple. Previously libc++ would
+// offer these constructors as an extension but they broke conforming code.
 void test_uses_allocator_sfinae_evaluation()
 {
      using BadDefault = DefaultCtorBlowsUp<>;
diff --git a/libcxx/test/support/assert_macros.h b/libcxx/test/support/assert_macros.h
index bf382e19d5e04ad..b7011794025bf03 100644
--- a/libcxx/test/support/assert_macros.h
+++ b/libcxx/test/support/assert_macros.h
@@ -66,7 +66,7 @@ void test_require(bool condition, const char* condition_str, const char* file, i
 
 // assert(false) replacement
 // The ARG is either a
-// - c-ctring or std::string, in which case the string is printed to stderr,
+// - c-string or std::string, in which case the string is printed to stderr,
 // - an invocable object, which will be invoked.
 #define TEST_FAIL(ARG) ::test_fail(__FILE__, __LINE__, ARG)
 
diff --git a/libcxx/test/support/boolean_testable.h b/libcxx/test/support/boolean_testable.h
index d06511970b9bbec..0abf2da4962ef8c 100644
--- a/libcxx/test/support/boolean_testable.h
+++ b/libcxx/test/support/boolean_testable.h
@@ -48,7 +48,7 @@ template <class T>
 struct StrictComparable {
   StrictComparable() = default;
 
-  // this shouldn't be explicit to make it easier to initlaize inside arrays (which it almost always is)
+  // this shouldn't be explicit to make it easier to initialize inside arrays (which it almost always is)
   constexpr StrictComparable(T value) : value_{value} {}
 
   friend constexpr BooleanTestable const& operator==(StrictComparable const& a, StrictComparable const& b) {
diff --git a/libcxx/test/support/concat_macros.h b/libcxx/test/support/concat_macros.h
index ea89c62df9a6590..8d80a8c9f69ca28 100644
--- a/libcxx/test/support/concat_macros.h
+++ b/libcxx/test/support/concat_macros.h
@@ -27,7 +27,7 @@ concept test_char_streamable = requires(T&& value) { std::stringstream{} << std:
 #  endif
 
 // If possible concatenates message for the assertion function, else returns a
-// default message. Not being able to stream is not considered and error. For
+// default message. Not being able to stream is not considered an error. For
 // example, streaming to std::wcerr doesn't work properly in the CI. Therefore
 // the formatting tests should only stream to std::string.
 //
diff --git a/libcxx/test/support/copy_move_types.h b/libcxx/test/support/copy_move_types.h
index 2fa42ddd6f8585f..dec8d94cac379a3 100644
--- a/libcxx/test/support/copy_move_types.h
+++ b/libcxx/test/support/copy_move_types.h
@@ -173,14 +173,14 @@ struct TracedCopyMove {
 template <>
 struct std::uses_allocator<TracedCopyMove, test_allocator<int>> : std::true_type {};
 
-// If the constructor tuple(tuple<UTyles...>&) is not available,
+// If the constructor tuple(tuple<UTypes...>&) is not available,
 // the fallback call to `tuple(const tuple&) = default;` or any other
 // constructor that takes const ref would increment the constCopy.
 inline constexpr bool nonConstCopyCtrCalled(const TracedCopyMove& obj) {
   return obj.nonConstCopy == 1 && obj.constCopy == 0 && obj.constMove == 0 && obj.nonConstMove == 0;
 }
 
-// If the constructor tuple(const tuple<UTyles...>&&) is not available,
+// If the constructor tuple(const tuple<UTypes...>&&) is not available,
 // the fallback call to `tuple(const tuple&) = default;` or any other
 // constructor that takes const ref would increment the constCopy.
 inline constexpr bool constMoveCtrCalled(const TracedCopyMove& obj) {
diff --git a/libcxx/test/support/iterator_traits_cpp17_iterators.h b/libcxx/test/support/iterator_traits_cpp17_iterators.h
index 27856013cdb425b..27c036dd5c21fdb 100644
--- a/libcxx/test/support/iterator_traits_cpp17_iterators.h
+++ b/libcxx/test/support/iterator_traits_cpp17_iterators.h
@@ -19,7 +19,7 @@ struct iterator_traits_cpp17_proxy_iterator {
   int operator*();
   iterator_traits_cpp17_proxy_iterator& operator++();
 
-  // this returns legcay_iterator, not iterator_traits_cpp17_proxy_iterator
+  // this returns legacy_iterator, not iterator_traits_cpp17_proxy_iterator
   iterator_traits_cpp17_iterator operator++(int);
 };
 
@@ -41,7 +41,7 @@ struct iterator_traits_cpp17_proxy_input_iterator {
   int operator*();
   iterator_traits_cpp17_proxy_input_iterator& operator++();
 
-  // this returns legcay_input_iterator, not iterator_traits_cpp17_proxy_input_iterator
+  // this returns legacy_input_iterator, not iterator_traits_cpp17_proxy_input_iterator
   iterator_traits_cpp17_input_iterator operator++(int);
 
   bool operator==(iterator_traits_cpp17_proxy_input_iterator const&) const;
diff --git a/libcxx/test/support/test_container_comparisons.h b/libcxx/test/support/test_container_comparisons.h
index 67165dcfdf4df7c..543c5899922d026 100644
--- a/libcxx/test/support/test_container_comparisons.h
+++ b/libcxx/test/support/test_container_comparisons.h
@@ -361,7 +361,7 @@ constexpr void test_ordered_set_spaceship_with_type(Compare comp) {
     }
   }
   if constexpr (std::is_same_v< Container<Elem>, std::set<PartialOrder>>) {
-    // Unodered values are not supported for `set`
+    // Unordered values are not supported for `set`
     if constexpr (std::is_same_v<Elem, PartialOrder> && std::is_same_v<Compare, decltype(std::less{})>) {
       Container<Elem, Compare> l1{{1, std::numeric_limits<int>::min()}, comp};
       Container<Elem, Compare> l2{{1, 2}, comp};

>From a336fa448becc8ef54351171122b84154d209f92 Mon Sep 17 00:00:00 2001
From: "Stephan T. Lavavej" <stl at nuwen.net>
Date: Fri, 24 Nov 2023 21:53:14 -0800
Subject: [PATCH 3/5] Cleanup static_assert typos.

---
 .../containers/views/mdspan/extents/ctor_from_array.pass.cpp    | 2 +-
 .../std/containers/views/mdspan/extents/ctor_from_span.pass.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libcxx/test/std/containers/views/mdspan/extents/ctor_from_array.pass.cpp b/libcxx/test/std/containers/views/mdspan/extents/ctor_from_array.pass.cpp
index ec4009e850c56b7..543436133fe797a 100644
--- a/libcxx/test/std/containers/views/mdspan/extents/ctor_from_array.pass.cpp
+++ b/libcxx/test/std/containers/views/mdspan/extents/ctor_from_array.pass.cpp
@@ -74,7 +74,7 @@ int main(int, char**) {
   std::array a5{3, 4, 5, 6, 7};
   // check that explicit construction works, i.e. no error
   static_assert(std::is_constructible_v< std::extents<int, D, D, 5, D, D>, decltype(a5)>,
-                "extents unexpectectly not constructible");
+                "extents unexpectedly not constructible");
   // check that implicit construction doesn't work
   assert((implicit_construction<std::extents<int, D, D, 5, D, D>>(a5).value == false));
 
diff --git a/libcxx/test/std/containers/views/mdspan/extents/ctor_from_span.pass.cpp b/libcxx/test/std/containers/views/mdspan/extents/ctor_from_span.pass.cpp
index ea9c5be48357fab..8c7aa0031e2bd74 100644
--- a/libcxx/test/std/containers/views/mdspan/extents/ctor_from_span.pass.cpp
+++ b/libcxx/test/std/containers/views/mdspan/extents/ctor_from_span.pass.cpp
@@ -76,7 +76,7 @@ int main(int, char**) {
   std::span<int, 5> s5(a5.data(), 5);
   // check that explicit construction works, i.e. no error
   static_assert(std::is_constructible_v< std::extents<int, D, D, 5, D, D>, decltype(s5)>,
-                "extents unexpectectly not constructible");
+                "extents unexpectedly not constructible");
   // check that implicit construction doesn't work
   assert((implicit_construction<std::extents<int, D, D, 5, D, D>>(s5).value == false));
 

>From c0f468507f85d3bc12b0175d253a3d0b7a302c42 Mon Sep 17 00:00:00 2001
From: "Stephan T. Lavavej" <stl at nuwen.net>
Date: Fri, 24 Nov 2023 21:13:07 -0800
Subject: [PATCH 4/5] Cleanup test code typos.

---
 .../ranges.transform.binary.range.pass.cpp     | 18 +++++++++---------
 .../ranges.transform.unary.pass.cpp            | 18 +++++++++---------
 .../push_back_exception_safety.pass.cpp        |  8 ++++----
 .../push_front_exception_safety.pass.cpp       |  8 ++++----
 .../push_front_exception_safety.pass.cpp       |  6 +++---
 .../push_back_exception_safety.pass.cpp        |  6 +++---
 .../push_front_exception_safety.pass.cpp       |  6 +++---
 .../range.drop/dangling.cache.pass.cpp         |  4 ++--
 .../sentinel/ctor.other.pass.cpp               | 12 ++++++------
 .../range.adaptors/range.zip/end.pass.cpp      |  8 ++++----
 .../ranges/range.adaptors/range.zip/types.h    |  4 ++--
 .../futures/futures.async/async.pass.cpp       |  4 ++--
 .../assign/emplace.intializer_list.pass.cpp    | 14 +++++++-------
 .../expected.expected/swap/free.swap.pass.cpp  | 10 +++++-----
 .../swap/member.swap.pass.cpp                  | 10 +++++-----
 .../expected.void/swap/free.swap.pass.cpp      |  8 ++++----
 .../expected.void/swap/member.swap.pass.cpp    |  8 ++++----
 .../tuple.cnstr/alloc_const_Types.verify.cpp   |  2 +-
 .../mem.poly.allocator.mem/tracking_mem_res.h  |  8 ++++----
 libcxx/test/support/test_iterators.h           | 12 ++++++------
 20 files changed, 87 insertions(+), 87 deletions(-)

diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp
index cc7c78bd3ad3282..08ca8aa3fd9ee24 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp
@@ -34,15 +34,15 @@ struct BinaryFunc {
 };
 
 template <class Range>
-concept HasTranformR = requires(Range r, int* out) { std::ranges::transform(r, r, out, BinaryFunc{}); };
-
-static_assert(HasTranformR<std::array<int, 1>>);
-static_assert(!HasTranformR<int>);
-static_assert(!HasTranformR<InputRangeNotDerivedFrom>);
-static_assert(!HasTranformR<InputRangeNotIndirectlyReadable>);
-static_assert(!HasTranformR<InputRangeNotInputOrOutputIterator>);
-static_assert(!HasTranformR<InputRangeNotSentinelSemiregular>);
-static_assert(!HasTranformR<InputRangeNotSentinelEqualityComparableWith>);
+concept HasTransformR = requires(Range r, int* out) { std::ranges::transform(r, r, out, BinaryFunc{}); };
+
+static_assert(HasTransformR<std::array<int, 1>>);
+static_assert(!HasTransformR<int>);
+static_assert(!HasTransformR<InputRangeNotDerivedFrom>);
+static_assert(!HasTransformR<InputRangeNotIndirectlyReadable>);
+static_assert(!HasTransformR<InputRangeNotInputOrOutputIterator>);
+static_assert(!HasTransformR<InputRangeNotSentinelSemiregular>);
+static_assert(!HasTransformR<InputRangeNotSentinelEqualityComparableWith>);
 
 template <class It>
 concept HasTransformOut = requires(int* it, int* sent, It out, std::array<int, 2> range) {
diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.unary.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.unary.pass.cpp
index b83f9cc4f060f95..eeacf83664cfeef 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.unary.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.unary.pass.cpp
@@ -31,15 +31,15 @@
 #include "almost_satisfies_types.h"
 
 template <class Range>
-concept HasTranformR = requires(Range r, int* out) { std::ranges::transform(r, out, std::identity{}); };
-
-static_assert(HasTranformR<std::array<int, 1>>);
-static_assert(!HasTranformR<int>);
-static_assert(!HasTranformR<InputRangeNotDerivedFrom>);
-static_assert(!HasTranformR<InputRangeNotIndirectlyReadable>);
-static_assert(!HasTranformR<InputRangeNotInputOrOutputIterator>);
-static_assert(!HasTranformR<InputRangeNotSentinelSemiregular>);
-static_assert(!HasTranformR<InputRangeNotSentinelEqualityComparableWith>);
+concept HasTransformR = requires(Range r, int* out) { std::ranges::transform(r, out, std::identity{}); };
+
+static_assert(HasTransformR<std::array<int, 1>>);
+static_assert(!HasTransformR<int>);
+static_assert(!HasTransformR<InputRangeNotDerivedFrom>);
+static_assert(!HasTransformR<InputRangeNotIndirectlyReadable>);
+static_assert(!HasTransformR<InputRangeNotInputOrOutputIterator>);
+static_assert(!HasTransformR<InputRangeNotSentinelSemiregular>);
+static_assert(!HasTransformR<InputRangeNotSentinelEqualityComparableWith>);
 
 template <class It, class Sent = It>
 concept HasTransformIt =
diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp
index 137129368b4ad44..925eeb51928b55d 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp
@@ -17,7 +17,7 @@
 #include <cassert>
 
 // Flag that makes the copy constructor for CMyClass throw an exception
-static bool gCopyConstructorShouldThow = false;
+static bool gCopyConstructorShouldThrow = false;
 
 class CMyClass {
     public: CMyClass(int tag);
@@ -51,7 +51,7 @@ CMyClass::CMyClass(const CMyClass& iOther) :
     fMagicValue(kStartedConstructionMagicValue), fTag(iOther.fTag)
 {
     // If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
-    if (gCopyConstructorShouldThow) {
+    if (gCopyConstructorShouldThrow) {
         throw std::exception();
     }
     // Signal that the constructor has finished running
@@ -74,13 +74,13 @@ int main(int, char**)
     vec.push_back(instance);
     std::deque<CMyClass> vec2(vec);
 
-    gCopyConstructorShouldThow = true;
+    gCopyConstructorShouldThrow = true;
     try {
         vec.push_back(instance);
         assert(false);
     }
     catch (...) {
-        gCopyConstructorShouldThow = false;
+        gCopyConstructorShouldThrow = false;
         assert(vec==vec2);
     }
     }
diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp
index 79f9a14f2309114..83a5b14766d9803 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp
@@ -17,7 +17,7 @@
 #include "test_allocator.h"
 
 // Flag that makes the copy constructor for CMyClass throw an exception
-static bool gCopyConstructorShouldThow = false;
+static bool gCopyConstructorShouldThrow = false;
 
 
 class CMyClass {
@@ -51,7 +51,7 @@ CMyClass::CMyClass(const CMyClass& iOther) :
     fMagicValue(kStartedConstructionMagicValue), fTag(iOther.fTag)
 {
     // If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
-    if (gCopyConstructorShouldThow) {
+    if (gCopyConstructorShouldThrow) {
         throw std::exception();
     }
     // Signal that the constructor has finished running
@@ -74,13 +74,13 @@ int main(int, char**)
     vec.push_front(instance);
     std::deque<CMyClass> vec2(vec);
 
-    gCopyConstructorShouldThow = true;
+    gCopyConstructorShouldThrow = true;
     try {
         vec.push_front(instance);
         assert(false);
     }
     catch (...) {
-        gCopyConstructorShouldThow = false;
+        gCopyConstructorShouldThrow = false;
         assert(vec==vec2);
     }
     }
diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp
index 57b9f58c07fbcfd..c0ad94fa03bd4e5 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp
@@ -18,7 +18,7 @@
 #include "test_macros.h"
 
 // Flag that makes the copy constructor for CMyClass throw an exception
-static bool gCopyConstructorShouldThow = false;
+static bool gCopyConstructorShouldThrow = false;
 
 
 class CMyClass {
@@ -48,7 +48,7 @@ CMyClass::CMyClass(const CMyClass& /*iOther*/) :
     fMagicValue(kStartedConstructionMagicValue)
 {
     // If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
-    if (gCopyConstructorShouldThow) {
+    if (gCopyConstructorShouldThrow) {
         throw std::exception();
     }
     // Signal that the constructor has finished running
@@ -67,7 +67,7 @@ int main(int, char**)
 
     vec.push_front(instance);
 
-    gCopyConstructorShouldThow = true;
+    gCopyConstructorShouldThrow = true;
     try {
         vec.push_front(instance);
     }
diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp
index dec63a58ad93a87..620aede2c16edb6 100644
--- a/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp
@@ -18,7 +18,7 @@
 #include "test_macros.h"
 
 // Flag that makes the copy constructor for CMyClass throw an exception
-static bool gCopyConstructorShouldThow = false;
+static bool gCopyConstructorShouldThrow = false;
 
 
 class CMyClass {
@@ -48,7 +48,7 @@ CMyClass::CMyClass(const CMyClass& /*iOther*/) :
     fMagicValue(kStartedConstructionMagicValue)
 {
     // If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
-    if (gCopyConstructorShouldThow) {
+    if (gCopyConstructorShouldThrow) {
         throw std::exception();
     }
     // Signal that the constructor has finished running
@@ -67,7 +67,7 @@ int main(int, char**)
 
     vec.push_back(instance);
 
-    gCopyConstructorShouldThow = true;
+    gCopyConstructorShouldThrow = true;
     try {
         vec.push_back(instance);
     }
diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp
index 4ce3b7e76b4930f..f65ad1a7d28eabd 100644
--- a/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp
@@ -18,7 +18,7 @@
 #include "test_macros.h"
 
 // Flag that makes the copy constructor for CMyClass throw an exception
-static bool gCopyConstructorShouldThow = false;
+static bool gCopyConstructorShouldThrow = false;
 
 
 class CMyClass {
@@ -48,7 +48,7 @@ CMyClass::CMyClass(const CMyClass& /*iOther*/) :
     fMagicValue(kStartedConstructionMagicValue)
 {
     // If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
-    if (gCopyConstructorShouldThow) {
+    if (gCopyConstructorShouldThrow) {
         throw std::exception();
     }
     // Signal that the constructor has finished running
@@ -67,7 +67,7 @@ int main(int, char**)
 
     vec.push_front(instance);
 
-    gCopyConstructorShouldThow = true;
+    gCopyConstructorShouldThrow = true;
     try {
         vec.push_front(instance);
     }
diff --git a/libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp
index fb9c5a2ff4adbd0..caf64c231c347ef 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp
@@ -48,10 +48,10 @@ struct ZeroOnDestroy : std::ranges::view_base {
 };
 
 int main(int, char**) {
-  auto noDanlingCache = ZeroOnDestroy::dropFirstFour();
+  auto noDanglingCache = ZeroOnDestroy::dropFirstFour();
   // If we use the cached version, it will reference the copied-from view.
   // Worst case this is a segfault, best case it's an assertion fired.
-  assert(*noDanlingCache.begin() == 5);
+  assert(*noDanglingCache.begin() == 5);
 
   return 0;
 }
diff --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp
index c2d7058746d758b..96196dcbaa5b313 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp
@@ -32,7 +32,7 @@ struct convertible_sentinel_wrapper {
   T it_;
 };
 
-struct ConstConveritbleView : BufferView<BufferView<int*>*> {
+struct ConstConvertibleView : BufferView<BufferView<int*>*> {
   using BufferView<BufferView<int*>*>::BufferView;
 
   using sentinel = convertible_sentinel_wrapper<BufferView<int*>*>;
@@ -43,16 +43,16 @@ struct ConstConveritbleView : BufferView<BufferView<int*>*> {
   constexpr sentinel end() { return sentinel(data_ + size_); }
   constexpr const_sentinel end() const { return const_sentinel(data_ + size_); }
 };
-static_assert(!std::ranges::common_range<ConstConveritbleView>);
-static_assert(std::convertible_to<std::ranges::sentinel_t<ConstConveritbleView>,
-                                  std::ranges::sentinel_t<ConstConveritbleView const>>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<ConstConveritbleView>);
+static_assert(!std::ranges::common_range<ConstConvertibleView>);
+static_assert(std::convertible_to<std::ranges::sentinel_t<ConstConvertibleView>,
+                                  std::ranges::sentinel_t<ConstConvertibleView const>>);
+LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<ConstConvertibleView>);
 
 constexpr bool test() {
   int buffer[4][4] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};
   {
     BufferView<int*> inners[] = {buffer[0], buffer[1], buffer[2]};
-    ConstConveritbleView outer(inners);
+    ConstConvertibleView outer(inners);
     std::ranges::join_view jv(outer);
     auto sent1 = jv.end();
     std::ranges::sentinel_t<const decltype(jv)> sent2 = sent1;
diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip/end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/end.pass.cpp
index d3649b933c61b6b..b7f64477a12d005 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/end.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/end.pass.cpp
@@ -154,14 +154,14 @@ constexpr bool test() {
   }
   {
     // test ID 13
-    std::ranges::zip_view v{SimpleNonCommonRandomAcessSized(buffer1)};
+    std::ranges::zip_view v{SimpleNonCommonRandomAccessSized(buffer1)};
     static_assert(std::ranges::common_range<decltype(v)>);
     assert(v.begin() + 5 == v.end());
     static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>);
   }
   {
     // test ID 14
-    std::ranges::zip_view v{SimpleNonCommonRandomAcessSized(buffer1), SimpleNonCommonRandomAcessSized(buffer2)};
+    std::ranges::zip_view v{SimpleNonCommonRandomAccessSized(buffer1), SimpleNonCommonRandomAccessSized(buffer2)};
     static_assert(std::ranges::common_range<decltype(v)>);
     assert(v.begin() + 1 == v.end());
     static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>);
@@ -308,14 +308,14 @@ constexpr bool test() {
   }
   {
     // test ID 35
-    std::ranges::zip_view v{NonSimpleNonCommonRandomAcessSized(buffer1)};
+    std::ranges::zip_view v{NonSimpleNonCommonRandomAccessSized(buffer1)};
     static_assert(std::ranges::common_range<decltype(v)>);
     assert(v.begin() + 5 == v.end());
     static_assert(!std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>);
   }
   {
     // test ID 36
-    std::ranges::zip_view v{NonSimpleNonCommonRandomAcessSized(buffer1), NonSimpleNonCommonRandomAcessSized(buffer2)};
+    std::ranges::zip_view v{NonSimpleNonCommonRandomAccessSized(buffer1), NonSimpleNonCommonRandomAccessSized(buffer2)};
     static_assert(std::ranges::common_range<decltype(v)>);
     assert(v.begin() + 1 == v.end());
     static_assert(!std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>);
diff --git a/libcxx/test/std/ranges/range.adaptors/range.zip/types.h b/libcxx/test/std/ranges/range.adaptors/range.zip/types.h
index fa82b836f529b1f..d4e3da3edec6c6f 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/types.h
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/types.h
@@ -127,9 +127,9 @@ struct NonCommonSized : IntBufferView {
 };
 
 using SimpleNonCommonSized = NonCommonSized<true>;
-using SimpleNonCommonRandomAcessSized = SimpleNonCommonSized;
+using SimpleNonCommonRandomAccessSized = SimpleNonCommonSized;
 using NonSimpleNonCommonSized = NonCommonSized<false>;
-using NonSimpleNonCommonRandomAcessSized = NonSimpleNonCommonSized;
+using NonSimpleNonCommonRandomAccessSized = NonSimpleNonCommonSized;
 
 static_assert(!std::ranges::common_range<SimpleNonCommonSized>);
 static_assert(std::ranges::random_access_range<SimpleNonCommonSized>);
diff --git a/libcxx/test/std/thread/futures/futures.async/async.pass.cpp b/libcxx/test/std/thread/futures/futures.async/async.pass.cpp
index b40fedf5c59993b..cf2a66e2d0d3395 100644
--- a/libcxx/test/std/thread/futures/futures.async/async.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.async/async.pass.cpp
@@ -78,8 +78,8 @@ void f5(int j)
     TEST_THROW(j);
 }
 
-template <class Ret, class CheckLamdba, class ...Args>
-void test(CheckLamdba&& getAndCheckFn, bool IsDeferred, Args&&... args) {
+template <class Ret, class CheckLambda, class ...Args>
+void test(CheckLambda&& getAndCheckFn, bool IsDeferred, Args&&... args) {
     // Reset global state.
     invoked = false;
 
diff --git a/libcxx/test/std/utilities/expected/expected.expected/assign/emplace.intializer_list.pass.cpp b/libcxx/test/std/utilities/expected/expected.expected/assign/emplace.intializer_list.pass.cpp
index 922200a8c0263d5..2f36349743f38d5 100644
--- a/libcxx/test/std/utilities/expected/expected.expected/assign/emplace.intializer_list.pass.cpp
+++ b/libcxx/test/std/utilities/expected/expected.expected/assign/emplace.intializer_list.pass.cpp
@@ -36,15 +36,15 @@ concept CanEmplace = requires(T t, Args&&... args) { t.emplace(std::forward<Args
 static_assert(CanEmplace<std::expected<int, int>, int>);
 
 template <bool Noexcept>
-struct CtorFromInitalizerList {
-  CtorFromInitalizerList(std::initializer_list<int>&) noexcept(Noexcept);
-  CtorFromInitalizerList(std::initializer_list<int>&, int) noexcept(Noexcept);
+struct CtorFromInitializerList {
+  CtorFromInitializerList(std::initializer_list<int>&) noexcept(Noexcept);
+  CtorFromInitializerList(std::initializer_list<int>&, int) noexcept(Noexcept);
 };
 
-static_assert(CanEmplace<std::expected<CtorFromInitalizerList<true>, int>, std::initializer_list<int>&>);
-static_assert(!CanEmplace<std::expected<CtorFromInitalizerList<false>, int>, std::initializer_list<int>&>);
-static_assert(CanEmplace<std::expected<CtorFromInitalizerList<true>, int>, std::initializer_list<int>&, int>);
-static_assert(!CanEmplace<std::expected<CtorFromInitalizerList<false>, int>, std::initializer_list<int>&, int>);
+static_assert(CanEmplace<std::expected<CtorFromInitializerList<true>, int>, std::initializer_list<int>&>);
+static_assert(!CanEmplace<std::expected<CtorFromInitializerList<false>, int>, std::initializer_list<int>&>);
+static_assert(CanEmplace<std::expected<CtorFromInitializerList<true>, int>, std::initializer_list<int>&, int>);
+static_assert(!CanEmplace<std::expected<CtorFromInitializerList<false>, int>, std::initializer_list<int>&, int>);
 
 struct Data {
   std::initializer_list<int> il;
diff --git a/libcxx/test/std/utilities/expected/expected.expected/swap/free.swap.pass.cpp b/libcxx/test/std/utilities/expected/expected.expected/swap/free.swap.pass.cpp
index 3c03efd83291967..05b49e3d8a48bd8 100644
--- a/libcxx/test/std/utilities/expected/expected.expected/swap/free.swap.pass.cpp
+++ b/libcxx/test/std/utilities/expected/expected.expected/swap/free.swap.pass.cpp
@@ -31,16 +31,16 @@ static_assert(!std::is_swappable_v<std::expected<NotSwappable, int>>);
 // !is_swappable_v<E>
 static_assert(!std::is_swappable_v<std::expected<int, NotSwappable>>);
 
-struct NotMoveContructible {
-  NotMoveContructible(NotMoveContructible&&) = delete;
-  friend void swap(NotMoveContructible&, NotMoveContructible&) {}
+struct NotMoveConstructible {
+  NotMoveConstructible(NotMoveConstructible&&) = delete;
+  friend void swap(NotMoveConstructible&, NotMoveConstructible&) {}
 };
 
 // !is_move_constructible_v<T>
-static_assert(!std::is_swappable_v<std::expected<NotMoveContructible, int>>);
+static_assert(!std::is_swappable_v<std::expected<NotMoveConstructible, int>>);
 
 // !is_move_constructible_v<E>
-static_assert(!std::is_swappable_v<std::expected<int, NotMoveContructible>>);
+static_assert(!std::is_swappable_v<std::expected<int, NotMoveConstructible>>);
 
 struct MoveMayThrow {
   MoveMayThrow(MoveMayThrow&&) noexcept(false);
diff --git a/libcxx/test/std/utilities/expected/expected.expected/swap/member.swap.pass.cpp b/libcxx/test/std/utilities/expected/expected.expected/swap/member.swap.pass.cpp
index b6b112cfbeb8ba7..34782303909e2a8 100644
--- a/libcxx/test/std/utilities/expected/expected.expected/swap/member.swap.pass.cpp
+++ b/libcxx/test/std/utilities/expected/expected.expected/swap/member.swap.pass.cpp
@@ -43,16 +43,16 @@ static_assert(!HasMemberSwap<NotSwappable, int>);
 // !is_swappable_v<E>
 static_assert(!HasMemberSwap<int, NotSwappable>);
 
-struct NotMoveContructible {
-  NotMoveContructible(NotMoveContructible&&) = delete;
-  friend void swap(NotMoveContructible&, NotMoveContructible&) {}
+struct NotMoveConstructible {
+  NotMoveConstructible(NotMoveConstructible&&) = delete;
+  friend void swap(NotMoveConstructible&, NotMoveConstructible&) {}
 };
 
 // !is_move_constructible_v<T>
-static_assert(!HasMemberSwap<NotMoveContructible, int>);
+static_assert(!HasMemberSwap<NotMoveConstructible, int>);
 
 // !is_move_constructible_v<E>
-static_assert(!HasMemberSwap<int, NotMoveContructible>);
+static_assert(!HasMemberSwap<int, NotMoveConstructible>);
 
 struct MoveMayThrow {
   MoveMayThrow(MoveMayThrow&&) noexcept(false);
diff --git a/libcxx/test/std/utilities/expected/expected.void/swap/free.swap.pass.cpp b/libcxx/test/std/utilities/expected/expected.void/swap/free.swap.pass.cpp
index f7314c79fa6db7b..5fe3db5c07fa90f 100644
--- a/libcxx/test/std/utilities/expected/expected.void/swap/free.swap.pass.cpp
+++ b/libcxx/test/std/utilities/expected/expected.void/swap/free.swap.pass.cpp
@@ -28,13 +28,13 @@ void swap(NotSwappable&, NotSwappable&) = delete;
 // !is_swappable_v<E>
 static_assert(!std::is_swappable_v<std::expected<void, NotSwappable>>);
 
-struct NotMoveContructible {
-  NotMoveContructible(NotMoveContructible&&) = delete;
-  friend void swap(NotMoveContructible&, NotMoveContructible&) {}
+struct NotMoveConstructible {
+  NotMoveConstructible(NotMoveConstructible&&) = delete;
+  friend void swap(NotMoveConstructible&, NotMoveConstructible&) {}
 };
 
 // !is_move_constructible_v<E>
-static_assert(!std::is_swappable_v<std::expected<void, NotMoveContructible>>);
+static_assert(!std::is_swappable_v<std::expected<void, NotMoveConstructible>>);
 
 // Test noexcept
 struct MoveMayThrow {
diff --git a/libcxx/test/std/utilities/expected/expected.void/swap/member.swap.pass.cpp b/libcxx/test/std/utilities/expected/expected.void/swap/member.swap.pass.cpp
index 70e004abef684a6..07980dee13c1e9a 100644
--- a/libcxx/test/std/utilities/expected/expected.void/swap/member.swap.pass.cpp
+++ b/libcxx/test/std/utilities/expected/expected.void/swap/member.swap.pass.cpp
@@ -37,13 +37,13 @@ void swap(NotSwappable&, NotSwappable&) = delete;
 // !is_swappable_v<E>
 static_assert(!HasMemberSwap<NotSwappable>);
 
-struct NotMoveContructible {
-  NotMoveContructible(NotMoveContructible&&) = delete;
-  friend void swap(NotMoveContructible&, NotMoveContructible&) {}
+struct NotMoveConstructible {
+  NotMoveConstructible(NotMoveConstructible&&) = delete;
+  friend void swap(NotMoveConstructible&, NotMoveConstructible&) {}
 };
 
 // !is_move_constructible_v<E>
-static_assert(!HasMemberSwap<NotMoveContructible>);
+static_assert(!HasMemberSwap<NotMoveConstructible>);
 
 // Test noexcept
 struct MoveMayThrow {
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.verify.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.verify.cpp
index 21ec4e07053ca72..21a3c03afa6faa4 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.verify.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc_const_Types.verify.cpp
@@ -30,7 +30,7 @@ std::tuple<ExplicitCopy> const_explicit_copy_test() {
     // expected-error at -1 {{chosen constructor is explicit in copy-initialization}}
 }
 
-std::tuple<ExplicitCopy> non_const_explicity_copy_test() {
+std::tuple<ExplicitCopy> non_const_explicit_copy_test() {
     ExplicitCopy e(42);
     return {std::allocator_arg, std::allocator<int>{}, e};
     // expected-error at -1 {{chosen constructor is explicit in copy-initialization}}
diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/tracking_mem_res.h b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/tracking_mem_res.h
index e78d9881eb457bd..73097c900a767fc 100644
--- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/tracking_mem_res.h
+++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/tracking_mem_res.h
@@ -14,21 +14,21 @@
 
 class TrackingMemRes : public std::pmr::memory_resource {
 public:
-  TrackingMemRes(std::size_t* last_size, size_t* last_alginment) : last_size_(last_size), last_alginment_(last_alginment) {}
+  TrackingMemRes(std::size_t* last_size, size_t* last_alignment) : last_size_(last_size), last_alignment_(last_alignment) {}
 
 private:
   std::size_t* last_size_;
-  std::size_t* last_alginment_;
+  std::size_t* last_alignment_;
   void* do_allocate(std::size_t size, size_t alignment) override {
     *last_size_      = size;
-    *last_alginment_ = alignment;
+    *last_alignment_ = alignment;
 
     return std::pmr::new_delete_resource()->allocate(size, alignment);
   }
 
   void do_deallocate(void* ptr, std::size_t size, size_t alignment) override {
     *last_size_      = size;
-    *last_alginment_ = alignment;
+    *last_alignment_ = alignment;
     std::pmr::new_delete_resource()->deallocate(ptr, size, alignment);
   }
 
diff --git a/libcxx/test/support/test_iterators.h b/libcxx/test/support/test_iterators.h
index 1133b9597d09cfb..c92ce375348ff4c 100644
--- a/libcxx/test/support/test_iterators.h
+++ b/libcxx/test/support/test_iterators.h
@@ -1430,11 +1430,11 @@ class iterator_wrapper {
   using iter_traits = std::iterator_traits<Iter>;
 
 public:
-  using iterator_cateory = typename iter_traits::iterator_category;
-  using value_type       = typename iter_traits::value_type;
-  using difference_type  = typename iter_traits::difference_type;
-  using pointer          = typename iter_traits::pointer;
-  using reference        = typename iter_traits::reference;
+  using iterator_category = typename iter_traits::iterator_category;
+  using value_type        = typename iter_traits::value_type;
+  using difference_type   = typename iter_traits::difference_type;
+  using pointer           = typename iter_traits::pointer;
+  using reference         = typename iter_traits::reference;
 
   constexpr iterator_wrapper() : iter_() {}
   constexpr explicit iterator_wrapper(Iter iter) : iter_(iter) {}
@@ -1506,7 +1506,7 @@ class throw_on_move_iterator : public iterator_wrapper<throw_on_move_iterator<It
 public:
   using difference_type   = typename base::difference_type;
   using value_type        = typename base::value_type;
-  using iterator_category = typename base::iterator_cateory;
+  using iterator_category = typename base::iterator_category;
 
   throw_on_move_iterator() = default;
   throw_on_move_iterator(Iter iter, int moves_until_throw)

>From a8632f986f059f4dca2a69ca7caa09d283f451b3 Mon Sep 17 00:00:00 2001
From: "Stephan T. Lavavej" <stl at nuwen.net>
Date: Fri, 24 Nov 2023 22:39:04 -0800
Subject: [PATCH 5/5] Fix massive test code typo - how was this compiling?!

---
 .../file_status.status.eq.ops.cpp                | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/libcxx/test/std/input.output/filesystems/class.file_status/file_status.status.eq.ops.cpp b/libcxx/test/std/input.output/filesystems/class.file_status/file_status.status.eq.ops.cpp
index 6b45a39d4a81b4d..7bf82af880f7568 100644
--- a/libcxx/test/std/input.output/filesystems/class.file_status/file_status.status.eq.ops.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.file_status/file_status.status.eq.ops.cpp
@@ -22,26 +22,26 @@
 
 void test() {
   {
-    std::fileystem::file_status f1;
-    std::fileystem::file_status f2;
+    std::filesystem::file_status f1;
+    std::filesystem::file_status f2;
 
     assert(testEquality(f1, f2, true));
   }
   {
-    std::fileystem::file_status f1{std::filesystem::file_type::regular, std::filesystem::perms::owner_read};
-    std::fileystem::file_status f2{std::filesystem::file_type::regular, std::filesystem::perms::owner_read};
+    std::filesystem::file_status f1{std::filesystem::file_type::regular, std::filesystem::perms::owner_read};
+    std::filesystem::file_status f2{std::filesystem::file_type::regular, std::filesystem::perms::owner_read};
 
     assert(testEquality(f1, f2, true));
   }
   {
-    std::fileystem::file_status f1{std::filesystem::file_type::regular, std::filesystem::perms::owner_read};
-    std::fileystem::file_status f2{std::filesystem::file_type::none, std::filesystem::perms::owner_read};
+    std::filesystem::file_status f1{std::filesystem::file_type::regular, std::filesystem::perms::owner_read};
+    std::filesystem::file_status f2{std::filesystem::file_type::none, std::filesystem::perms::owner_read};
 
     assert(testEquality(f1, f2, false));
   }
   {
-    std::fileystem::file_status f1{std::filesystem::file_type::regular, std::filesystem::perms::owner_read};
-    std::fileystem::file_status f2{std::filesystem::file_type::regular, std::filesystem::perms::owner_write};
+    std::filesystem::file_status f1{std::filesystem::file_type::regular, std::filesystem::perms::owner_read};
+    std::filesystem::file_status f2{std::filesystem::file_type::regular, std::filesystem::perms::owner_write};
 
     assert(testEquality(f1, f2, false));
   }



More information about the libcxx-commits mailing list