[libcxx-commits] [libcxx] b9e41ae - [clang][libc++] Fix spelling of "synthesize" (#158523)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Sep 29 23:30:03 PDT 2025


Author: halbi2
Date: 2025-09-30T08:29:59+02:00
New Revision: b9e41ae6f9efb068e1fe137357c3d8ded31cdd02

URL: https://github.com/llvm/llvm-project/commit/b9e41ae6f9efb068e1fe137357c3d8ded31cdd02
DIFF: https://github.com/llvm/llvm-project/commit/b9e41ae6f9efb068e1fe137357c3d8ded31cdd02.diff

LOG: [clang][libc++] Fix spelling of "synthesize" (#158523)

There is a tradition to use U.S. English spellings for APIs. For
example, it's uninitialized_fill and not uninitialised_fill,
specialization not specialisation, etcetera.

Added: 
    clang/test/SemaCXX/type-trait-synthesizes-from-spaceship.cpp

Modified: 
    clang/docs/LanguageExtensions.rst
    clang/docs/ReleaseNotes.rst
    clang/include/clang/Basic/TokenKinds.def
    clang/lib/Sema/SemaTypeTraits.cpp
    libcxx/include/__utility/default_three_way_comparator.h
    libcxx/include/string
    libcxx/test/libcxx/utilities/utility/has_default_three_way.compile.pass.cpp

Removed: 
    clang/test/SemaCXX/type-trait-synthesises-from-spaceship.cpp


################################################################################
diff  --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index b503283559db4..6bb99c757cd19 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -2065,9 +2065,9 @@ The following type trait primitives are supported by Clang. Those traits marked
     Returns true if a reference ``T`` can be copy-initialized from a temporary of type
     a non-cv-qualified ``U``.
 * ``__underlying_type`` (C++, GNU, Microsoft)
-* ``__builtin_lt_synthesises_from_spaceship``, ``__builtin_gt_synthesises_from_spaceship``,
-  ``__builtin_le_synthesises_from_spaceship``, ``__builtin_ge_synthesises_from_spaceship`` (Clang):
-  These builtins can be used to determine whether the corresponding operator is synthesised from a spaceship operator.
+* ``__builtin_lt_synthesizes_from_spaceship``, ``__builtin_gt_synthesizes_from_spaceship``,
+  ``__builtin_le_synthesizes_from_spaceship``, ``__builtin_ge_synthesizes_from_spaceship`` (Clang):
+  These builtins can be used to determine whether the corresponding operator is synthesized from a spaceship operator.
 
 In addition, the following expression traits are supported:
 

diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 79dc0b2728e98..3b269ccd57718 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -142,8 +142,8 @@ What's New in Clang |release|?
 C++ Language Changes
 --------------------
 
-- A new family of builtins ``__builtin_*_synthesises_from_spaceship`` has been added. These can be queried to know
-  whether the ``<`` (``lt``), ``>`` (``gt``), ``<=`` (``le``), or ``>=`` (``ge``) operators are synthesised from a
+- A new family of builtins ``__builtin_*_synthesizes_from_spaceship`` has been added. These can be queried to know
+  whether the ``<`` (``lt``), ``>`` (``gt``), ``<=`` (``le``), or ``>=`` (``ge``) operators are synthesized from a
   ``<=>``. This makes it possible to optimize certain facilities by using the ``<=>`` operation directly instead of
   doing multiple comparisons.
 

diff  --git a/clang/include/clang/Basic/TokenKinds.def b/clang/include/clang/Basic/TokenKinds.def
index 9d1a23d1af218..564d6010181cc 100644
--- a/clang/include/clang/Basic/TokenKinds.def
+++ b/clang/include/clang/Basic/TokenKinds.def
@@ -552,10 +552,10 @@ TYPE_TRAIT_1(__can_pass_in_regs, CanPassInRegs, KEYCXX)
 TYPE_TRAIT_2(__reference_binds_to_temporary, ReferenceBindsToTemporary, KEYCXX)
 TYPE_TRAIT_2(__reference_constructs_from_temporary, ReferenceConstructsFromTemporary, KEYCXX)
 TYPE_TRAIT_2(__reference_converts_from_temporary, ReferenceConvertsFromTemporary, KEYCXX)
-TYPE_TRAIT_2(__builtin_lt_synthesises_from_spaceship, LtSynthesisesFromSpaceship, KEYCXX)
-TYPE_TRAIT_2(__builtin_le_synthesises_from_spaceship, LeSynthesisesFromSpaceship, KEYCXX)
-TYPE_TRAIT_2(__builtin_gt_synthesises_from_spaceship, GtSynthesisesFromSpaceship, KEYCXX)
-TYPE_TRAIT_2(__builtin_ge_synthesises_from_spaceship, GeSynthesisesFromSpaceship, KEYCXX)
+TYPE_TRAIT_2(__builtin_lt_synthesizes_from_spaceship, LtSynthesizesFromSpaceship, KEYCXX)
+TYPE_TRAIT_2(__builtin_le_synthesizes_from_spaceship, LeSynthesizesFromSpaceship, KEYCXX)
+TYPE_TRAIT_2(__builtin_gt_synthesizes_from_spaceship, GtSynthesizesFromSpaceship, KEYCXX)
+TYPE_TRAIT_2(__builtin_ge_synthesizes_from_spaceship, GeSynthesizesFromSpaceship, KEYCXX)
 // IsDeducible is only used internally by clang for CTAD implementation and
 // is not exposed to users.
 TYPE_TRAIT_2(/*EmptySpellingName*/, IsDeducible, KEYCXX)

diff  --git a/clang/lib/Sema/SemaTypeTraits.cpp b/clang/lib/Sema/SemaTypeTraits.cpp
index 6c798d6acb0a0..3e34675cbf064 100644
--- a/clang/lib/Sema/SemaTypeTraits.cpp
+++ b/clang/lib/Sema/SemaTypeTraits.cpp
@@ -1830,10 +1830,10 @@ static bool EvaluateBinaryTypeTrait(Sema &Self, TypeTrait BTT,
 
     return Self.HLSL().IsScalarizedLayoutCompatible(LhsT, RhsT);
   }
-  case BTT_LtSynthesisesFromSpaceship:
-  case BTT_LeSynthesisesFromSpaceship:
-  case BTT_GtSynthesisesFromSpaceship:
-  case BTT_GeSynthesisesFromSpaceship: {
+  case BTT_LtSynthesizesFromSpaceship:
+  case BTT_LeSynthesizesFromSpaceship:
+  case BTT_GtSynthesizesFromSpaceship:
+  case BTT_GeSynthesizesFromSpaceship: {
     EnterExpressionEvaluationContext UnevaluatedContext(
         Self, Sema::ExpressionEvaluationContext::Unevaluated);
     Sema::SFINAETrap SFINAE(Self, /*ForValidityCheck=*/true);
@@ -1852,13 +1852,13 @@ static bool EvaluateBinaryTypeTrait(Sema &Self, TypeTrait BTT,
 
     auto OpKind = [&] {
       switch (BTT) {
-      case BTT_LtSynthesisesFromSpaceship:
+      case BTT_LtSynthesizesFromSpaceship:
         return BinaryOperatorKind::BO_LT;
-      case BTT_LeSynthesisesFromSpaceship:
+      case BTT_LeSynthesizesFromSpaceship:
         return BinaryOperatorKind::BO_LE;
-      case BTT_GtSynthesisesFromSpaceship:
+      case BTT_GtSynthesizesFromSpaceship:
         return BinaryOperatorKind::BO_GT;
-      case BTT_GeSynthesisesFromSpaceship:
+      case BTT_GeSynthesizesFromSpaceship:
         return BinaryOperatorKind::BO_GE;
       default:
         llvm_unreachable("Trying to Synthesize non-comparison operator?");

diff  --git a/clang/test/SemaCXX/type-trait-synthesises-from-spaceship.cpp b/clang/test/SemaCXX/type-trait-synthesizes-from-spaceship.cpp
similarity index 57%
rename from clang/test/SemaCXX/type-trait-synthesises-from-spaceship.cpp
rename to clang/test/SemaCXX/type-trait-synthesizes-from-spaceship.cpp
index ba581475bb4c7..be312f453f4be 100644
--- a/clang/test/SemaCXX/type-trait-synthesises-from-spaceship.cpp
+++ b/clang/test/SemaCXX/type-trait-synthesizes-from-spaceship.cpp
@@ -1,24 +1,24 @@
 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s
 
-static_assert(!__builtin_lt_synthesises_from_spaceship()); // expected-error {{expected a type}}
-static_assert(!__builtin_lt_synthesises_from_spaceship(int)); // expected-error {{type trait requires 2 arguments; have 1 argument}}
-static_assert(!__builtin_lt_synthesises_from_spaceship(int, int, int)); // expected-error {{type trait requires 2 arguments; have 3 argument}}
-static_assert(!__builtin_lt_synthesises_from_spaceship(int, 0)); // expected-error {{expected a type}}
-
-static_assert(!__builtin_le_synthesises_from_spaceship()); // expected-error {{expected a type}}
-static_assert(!__builtin_le_synthesises_from_spaceship(int)); // expected-error {{type trait requires 2 arguments; have 1 argument}}
-static_assert(!__builtin_le_synthesises_from_spaceship(int, int, int)); // expected-error {{type trait requires 2 arguments; have 3 argument}}
-static_assert(!__builtin_le_synthesises_from_spaceship(int, 0)); // expected-error {{expected a type}}
-
-static_assert(!__builtin_gt_synthesises_from_spaceship()); // expected-error {{expected a type}}
-static_assert(!__builtin_gt_synthesises_from_spaceship(int)); // expected-error {{type trait requires 2 arguments; have 1 argument}}
-static_assert(!__builtin_gt_synthesises_from_spaceship(int, int, int)); // expected-error {{type trait requires 2 arguments; have 3 argument}}
-static_assert(!__builtin_gt_synthesises_from_spaceship(int, 0)); // expected-error {{expected a type}}
-
-static_assert(!__builtin_ge_synthesises_from_spaceship()); // expected-error {{expected a type}}
-static_assert(!__builtin_ge_synthesises_from_spaceship(int)); // expected-error {{type trait requires 2 arguments; have 1 argument}}
-static_assert(!__builtin_ge_synthesises_from_spaceship(int, int, int)); // expected-error {{type trait requires 2 arguments; have 3 argument}}
-static_assert(!__builtin_ge_synthesises_from_spaceship(int, 0)); // expected-error {{expected a type}}
+static_assert(!__builtin_lt_synthesizes_from_spaceship()); // expected-error {{expected a type}}
+static_assert(!__builtin_lt_synthesizes_from_spaceship(int)); // expected-error {{type trait requires 2 arguments; have 1 argument}}
+static_assert(!__builtin_lt_synthesizes_from_spaceship(int, int, int)); // expected-error {{type trait requires 2 arguments; have 3 argument}}
+static_assert(!__builtin_lt_synthesizes_from_spaceship(int, 0)); // expected-error {{expected a type}}
+
+static_assert(!__builtin_le_synthesizes_from_spaceship()); // expected-error {{expected a type}}
+static_assert(!__builtin_le_synthesizes_from_spaceship(int)); // expected-error {{type trait requires 2 arguments; have 1 argument}}
+static_assert(!__builtin_le_synthesizes_from_spaceship(int, int, int)); // expected-error {{type trait requires 2 arguments; have 3 argument}}
+static_assert(!__builtin_le_synthesizes_from_spaceship(int, 0)); // expected-error {{expected a type}}
+
+static_assert(!__builtin_gt_synthesizes_from_spaceship()); // expected-error {{expected a type}}
+static_assert(!__builtin_gt_synthesizes_from_spaceship(int)); // expected-error {{type trait requires 2 arguments; have 1 argument}}
+static_assert(!__builtin_gt_synthesizes_from_spaceship(int, int, int)); // expected-error {{type trait requires 2 arguments; have 3 argument}}
+static_assert(!__builtin_gt_synthesizes_from_spaceship(int, 0)); // expected-error {{expected a type}}
+
+static_assert(!__builtin_ge_synthesizes_from_spaceship()); // expected-error {{expected a type}}
+static_assert(!__builtin_ge_synthesizes_from_spaceship(int)); // expected-error {{type trait requires 2 arguments; have 1 argument}}
+static_assert(!__builtin_ge_synthesizes_from_spaceship(int, int, int)); // expected-error {{type trait requires 2 arguments; have 3 argument}}
+static_assert(!__builtin_ge_synthesizes_from_spaceship(int, 0)); // expected-error {{expected a type}}
 
 namespace std {
   struct strong_ordering {
@@ -35,10 +35,10 @@ struct DefaultSpaceship {
   friend auto operator<=>(DefaultSpaceship, DefaultSpaceship) = default;
 };
 
-static_assert(__builtin_lt_synthesises_from_spaceship(const DefaultSpaceship&, const DefaultSpaceship&));
-static_assert(__builtin_le_synthesises_from_spaceship(const DefaultSpaceship&, const DefaultSpaceship&));
-static_assert(__builtin_gt_synthesises_from_spaceship(const DefaultSpaceship&, const DefaultSpaceship&));
-static_assert(__builtin_ge_synthesises_from_spaceship(const DefaultSpaceship&, const DefaultSpaceship&));
+static_assert(__builtin_lt_synthesizes_from_spaceship(const DefaultSpaceship&, const DefaultSpaceship&));
+static_assert(__builtin_le_synthesizes_from_spaceship(const DefaultSpaceship&, const DefaultSpaceship&));
+static_assert(__builtin_gt_synthesizes_from_spaceship(const DefaultSpaceship&, const DefaultSpaceship&));
+static_assert(__builtin_ge_synthesizes_from_spaceship(const DefaultSpaceship&, const DefaultSpaceship&));
 
 struct CustomSpaceship {
   int i;
@@ -48,10 +48,10 @@ struct CustomSpaceship {
   }
 };
 
-static_assert(__builtin_lt_synthesises_from_spaceship(const CustomSpaceship&, const CustomSpaceship&));
-static_assert(__builtin_le_synthesises_from_spaceship(const CustomSpaceship&, const CustomSpaceship&));
-static_assert(__builtin_gt_synthesises_from_spaceship(const CustomSpaceship&, const CustomSpaceship&));
-static_assert(__builtin_ge_synthesises_from_spaceship(const CustomSpaceship&, const CustomSpaceship&));
+static_assert(__builtin_lt_synthesizes_from_spaceship(const CustomSpaceship&, const CustomSpaceship&));
+static_assert(__builtin_le_synthesizes_from_spaceship(const CustomSpaceship&, const CustomSpaceship&));
+static_assert(__builtin_gt_synthesizes_from_spaceship(const CustomSpaceship&, const CustomSpaceship&));
+static_assert(__builtin_ge_synthesizes_from_spaceship(const CustomSpaceship&, const CustomSpaceship&));
 
 struct CustomLT {
   int i;
@@ -61,10 +61,10 @@ struct CustomLT {
   }
 };
 
-static_assert(!__builtin_lt_synthesises_from_spaceship(const CustomLT&, const CustomLT&));
-static_assert(!__builtin_le_synthesises_from_spaceship(const CustomLT&, const CustomLT&));
-static_assert(!__builtin_gt_synthesises_from_spaceship(const CustomLT&, const CustomLT&));
-static_assert(!__builtin_ge_synthesises_from_spaceship(const CustomLT&, const CustomLT&));
+static_assert(!__builtin_lt_synthesizes_from_spaceship(const CustomLT&, const CustomLT&));
+static_assert(!__builtin_le_synthesizes_from_spaceship(const CustomLT&, const CustomLT&));
+static_assert(!__builtin_gt_synthesizes_from_spaceship(const CustomLT&, const CustomLT&));
+static_assert(!__builtin_ge_synthesizes_from_spaceship(const CustomLT&, const CustomLT&));
 
 struct CustomLE {
   int i;
@@ -74,10 +74,10 @@ struct CustomLE {
   }
 };
 
-static_assert(!__builtin_lt_synthesises_from_spaceship(const CustomLE&, const CustomLE&));
-static_assert(!__builtin_le_synthesises_from_spaceship(const CustomLE&, const CustomLE&));
-static_assert(!__builtin_gt_synthesises_from_spaceship(const CustomLE&, const CustomLE&));
-static_assert(!__builtin_ge_synthesises_from_spaceship(const CustomLE&, const CustomLE&));
+static_assert(!__builtin_lt_synthesizes_from_spaceship(const CustomLE&, const CustomLE&));
+static_assert(!__builtin_le_synthesizes_from_spaceship(const CustomLE&, const CustomLE&));
+static_assert(!__builtin_gt_synthesizes_from_spaceship(const CustomLE&, const CustomLE&));
+static_assert(!__builtin_ge_synthesizes_from_spaceship(const CustomLE&, const CustomLE&));
 
 struct CustomGT {
   int i;
@@ -87,10 +87,10 @@ struct CustomGT {
   }
 };
 
-static_assert(!__builtin_lt_synthesises_from_spaceship(const CustomGT&, const CustomGT&));
-static_assert(!__builtin_le_synthesises_from_spaceship(const CustomGT&, const CustomGT&));
-static_assert(!__builtin_gt_synthesises_from_spaceship(const CustomGT&, const CustomGT&));
-static_assert(!__builtin_ge_synthesises_from_spaceship(const CustomGT&, const CustomGT&));
+static_assert(!__builtin_lt_synthesizes_from_spaceship(const CustomGT&, const CustomGT&));
+static_assert(!__builtin_le_synthesizes_from_spaceship(const CustomGT&, const CustomGT&));
+static_assert(!__builtin_gt_synthesizes_from_spaceship(const CustomGT&, const CustomGT&));
+static_assert(!__builtin_ge_synthesizes_from_spaceship(const CustomGT&, const CustomGT&));
 
 struct CustomGE {
   int i;
@@ -100,10 +100,10 @@ struct CustomGE {
   }
 };
 
-static_assert(!__builtin_lt_synthesises_from_spaceship(const CustomGE&, const CustomGE&));
-static_assert(!__builtin_le_synthesises_from_spaceship(const CustomGE&, const CustomGE&));
-static_assert(!__builtin_gt_synthesises_from_spaceship(const CustomGE&, const CustomGE&));
-static_assert(!__builtin_ge_synthesises_from_spaceship(const CustomGE&, const CustomGE&));
+static_assert(!__builtin_lt_synthesizes_from_spaceship(const CustomGE&, const CustomGE&));
+static_assert(!__builtin_le_synthesizes_from_spaceship(const CustomGE&, const CustomGE&));
+static_assert(!__builtin_gt_synthesizes_from_spaceship(const CustomGE&, const CustomGE&));
+static_assert(!__builtin_ge_synthesizes_from_spaceship(const CustomGE&, const CustomGE&));
 
 struct CustomLTAndSpaceship {
   int i;
@@ -117,10 +117,10 @@ struct CustomLTAndSpaceship {
   }
 };
 
-static_assert(!__builtin_lt_synthesises_from_spaceship(const CustomLTAndSpaceship&, const CustomLTAndSpaceship&));
-static_assert(__builtin_le_synthesises_from_spaceship(const CustomLTAndSpaceship&, const CustomLTAndSpaceship&));
-static_assert(__builtin_gt_synthesises_from_spaceship(const CustomLTAndSpaceship&, const CustomLTAndSpaceship&));
-static_assert(__builtin_ge_synthesises_from_spaceship(const CustomLTAndSpaceship&, const CustomLTAndSpaceship&));
+static_assert(!__builtin_lt_synthesizes_from_spaceship(const CustomLTAndSpaceship&, const CustomLTAndSpaceship&));
+static_assert(__builtin_le_synthesizes_from_spaceship(const CustomLTAndSpaceship&, const CustomLTAndSpaceship&));
+static_assert(__builtin_gt_synthesizes_from_spaceship(const CustomLTAndSpaceship&, const CustomLTAndSpaceship&));
+static_assert(__builtin_ge_synthesizes_from_spaceship(const CustomLTAndSpaceship&, const CustomLTAndSpaceship&));
 
 struct CustomLEAndSpaceship {
   int i;
@@ -134,10 +134,10 @@ struct CustomLEAndSpaceship {
   }
 };
 
-static_assert(__builtin_lt_synthesises_from_spaceship(const CustomLEAndSpaceship&, const CustomLEAndSpaceship&));
-static_assert(!__builtin_le_synthesises_from_spaceship(const CustomLEAndSpaceship&, const CustomLEAndSpaceship&));
-static_assert(__builtin_gt_synthesises_from_spaceship(const CustomLEAndSpaceship&, const CustomLEAndSpaceship&));
-static_assert(__builtin_ge_synthesises_from_spaceship(const CustomLEAndSpaceship&, const CustomLEAndSpaceship&));
+static_assert(__builtin_lt_synthesizes_from_spaceship(const CustomLEAndSpaceship&, const CustomLEAndSpaceship&));
+static_assert(!__builtin_le_synthesizes_from_spaceship(const CustomLEAndSpaceship&, const CustomLEAndSpaceship&));
+static_assert(__builtin_gt_synthesizes_from_spaceship(const CustomLEAndSpaceship&, const CustomLEAndSpaceship&));
+static_assert(__builtin_ge_synthesizes_from_spaceship(const CustomLEAndSpaceship&, const CustomLEAndSpaceship&));
 
 struct CustomGTAndSpaceship {
   int i;
@@ -151,10 +151,10 @@ struct CustomGTAndSpaceship {
   }
 };
 
-static_assert(__builtin_lt_synthesises_from_spaceship(const CustomGTAndSpaceship&, const CustomGTAndSpaceship&));
-static_assert(__builtin_le_synthesises_from_spaceship(const CustomGTAndSpaceship&, const CustomGTAndSpaceship&));
-static_assert(!__builtin_gt_synthesises_from_spaceship(const CustomGTAndSpaceship&, const CustomGTAndSpaceship&));
-static_assert(__builtin_ge_synthesises_from_spaceship(const CustomGTAndSpaceship&, const CustomGTAndSpaceship&));
+static_assert(__builtin_lt_synthesizes_from_spaceship(const CustomGTAndSpaceship&, const CustomGTAndSpaceship&));
+static_assert(__builtin_le_synthesizes_from_spaceship(const CustomGTAndSpaceship&, const CustomGTAndSpaceship&));
+static_assert(!__builtin_gt_synthesizes_from_spaceship(const CustomGTAndSpaceship&, const CustomGTAndSpaceship&));
+static_assert(__builtin_ge_synthesizes_from_spaceship(const CustomGTAndSpaceship&, const CustomGTAndSpaceship&));
 
 struct CustomGEAndSpaceship {
   int i;
@@ -168,10 +168,10 @@ struct CustomGEAndSpaceship {
   }
 };
 
-static_assert(__builtin_lt_synthesises_from_spaceship(const CustomGEAndSpaceship&, const CustomGEAndSpaceship&));
-static_assert(__builtin_le_synthesises_from_spaceship(const CustomGEAndSpaceship&, const CustomGEAndSpaceship&));
-static_assert(__builtin_gt_synthesises_from_spaceship(const CustomGEAndSpaceship&, const CustomGEAndSpaceship&));
-static_assert(!__builtin_ge_synthesises_from_spaceship(const CustomGEAndSpaceship&, const CustomGEAndSpaceship&));
+static_assert(__builtin_lt_synthesizes_from_spaceship(const CustomGEAndSpaceship&, const CustomGEAndSpaceship&));
+static_assert(__builtin_le_synthesizes_from_spaceship(const CustomGEAndSpaceship&, const CustomGEAndSpaceship&));
+static_assert(__builtin_gt_synthesizes_from_spaceship(const CustomGEAndSpaceship&, const CustomGEAndSpaceship&));
+static_assert(!__builtin_ge_synthesizes_from_spaceship(const CustomGEAndSpaceship&, const CustomGEAndSpaceship&));
 
 struct DefaultedCmpAndSpaceship {
   int i;
@@ -187,10 +187,10 @@ struct DefaultedCmpAndSpaceship {
 };
 
 // TODO: This should probably return true
-static_assert(!__builtin_lt_synthesises_from_spaceship(const DefaultedCmpAndSpaceship&, const DefaultedCmpAndSpaceship&));
-static_assert(!__builtin_le_synthesises_from_spaceship(const DefaultedCmpAndSpaceship&, const DefaultedCmpAndSpaceship&));
-static_assert(!__builtin_gt_synthesises_from_spaceship(const DefaultedCmpAndSpaceship&, const DefaultedCmpAndSpaceship&));
-static_assert(!__builtin_ge_synthesises_from_spaceship(const DefaultedCmpAndSpaceship&, const DefaultedCmpAndSpaceship&));
+static_assert(!__builtin_lt_synthesizes_from_spaceship(const DefaultedCmpAndSpaceship&, const DefaultedCmpAndSpaceship&));
+static_assert(!__builtin_le_synthesizes_from_spaceship(const DefaultedCmpAndSpaceship&, const DefaultedCmpAndSpaceship&));
+static_assert(!__builtin_gt_synthesizes_from_spaceship(const DefaultedCmpAndSpaceship&, const DefaultedCmpAndSpaceship&));
+static_assert(!__builtin_ge_synthesizes_from_spaceship(const DefaultedCmpAndSpaceship&, const DefaultedCmpAndSpaceship&));
 
 struct DifferentTypes {
   int i;
@@ -200,13 +200,13 @@ struct DifferentTypes {
   }
 };
 
-static_assert(__builtin_lt_synthesises_from_spaceship(const DifferentTypes&, const int&));
-static_assert(__builtin_le_synthesises_from_spaceship(const DifferentTypes&, const int&));
-static_assert(__builtin_gt_synthesises_from_spaceship(const DifferentTypes&, const int&));
-static_assert(__builtin_ge_synthesises_from_spaceship(const DifferentTypes&, const int&));
+static_assert(__builtin_lt_synthesizes_from_spaceship(const DifferentTypes&, const int&));
+static_assert(__builtin_le_synthesizes_from_spaceship(const DifferentTypes&, const int&));
+static_assert(__builtin_gt_synthesizes_from_spaceship(const DifferentTypes&, const int&));
+static_assert(__builtin_ge_synthesizes_from_spaceship(const DifferentTypes&, const int&));
 
 // TODO: Should this return true? It's technically not synthesized from spaceship, but it behaves exactly as-if it was
-static_assert(!__builtin_lt_synthesises_from_spaceship(int, int));
-static_assert(!__builtin_le_synthesises_from_spaceship(int, int));
-static_assert(!__builtin_gt_synthesises_from_spaceship(int, int));
-static_assert(!__builtin_ge_synthesises_from_spaceship(int, int));
+static_assert(!__builtin_lt_synthesizes_from_spaceship(int, int));
+static_assert(!__builtin_le_synthesizes_from_spaceship(int, int));
+static_assert(!__builtin_gt_synthesizes_from_spaceship(int, int));
+static_assert(!__builtin_ge_synthesizes_from_spaceship(int, int));

diff  --git a/libcxx/include/__utility/default_three_way_comparator.h b/libcxx/include/__utility/default_three_way_comparator.h
index 438ab55b43230..92cdce6aae117 100644
--- a/libcxx/include/__utility/default_three_way_comparator.h
+++ b/libcxx/include/__utility/default_three_way_comparator.h
@@ -40,13 +40,13 @@ struct __default_three_way_comparator<_LHS,
   }
 };
 
-#if _LIBCPP_STD_VER >= 20 && __has_builtin(__builtin_lt_synthesises_from_spaceship)
+#if _LIBCPP_STD_VER >= 20 && __has_builtin(__builtin_lt_synthesizes_from_spaceship)
 template <class _LHS, class _RHS>
 struct __default_three_way_comparator<
     _LHS,
     _RHS,
     __enable_if_t<!(is_arithmetic<_LHS>::value && is_arithmetic<_RHS>::value) &&
-                  __builtin_lt_synthesises_from_spaceship(const _LHS&, const _RHS&)>> {
+                  __builtin_lt_synthesizes_from_spaceship(const _LHS&, const _RHS&)>> {
   _LIBCPP_HIDE_FROM_ABI static int operator()(const _LHS& __lhs, const _RHS& __rhs) {
     auto __res = __lhs <=> __rhs;
     if (__res < 0)

diff  --git a/libcxx/include/string b/libcxx/include/string
index 729a420d47598..cfd6861e5c9c2 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -2552,7 +2552,7 @@ _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, wchar_t)
 #  endif
 #  undef _LIBCPP_DECLARE
 
-#  if _LIBCPP_STD_VER <= 17 || !__has_builtin(__builtin_lt_synthesises_from_spaceship)
+#  if _LIBCPP_STD_VER <= 17 || !__has_builtin(__builtin_lt_synthesizes_from_spaceship)
 template <class _CharT, class _Traits, class _Alloc>
 struct __default_three_way_comparator<basic_string<_CharT, _Traits, _Alloc>, basic_string<_CharT, _Traits, _Alloc> > {
   using __string_t _LIBCPP_NODEBUG = basic_string<_CharT, _Traits, _Alloc>;

diff  --git a/libcxx/test/libcxx/utilities/utility/has_default_three_way.compile.pass.cpp b/libcxx/test/libcxx/utilities/utility/has_default_three_way.compile.pass.cpp
index 42b4855a9fddd..625b194b1eb1a 100644
--- a/libcxx/test/libcxx/utilities/utility/has_default_three_way.compile.pass.cpp
+++ b/libcxx/test/libcxx/utilities/utility/has_default_three_way.compile.pass.cpp
@@ -18,7 +18,7 @@ static_assert(std::__has_default_three_way_comparator<long, int>::value);
 static_assert(std::__has_default_three_way_comparator<long, long>::value);
 static_assert(std::__has_default_three_way_comparator<std::string, std::string>::value);
 
-#if __has_builtin(__builtin_lt_synthesises_from_spaceship)
+#if __has_builtin(__builtin_lt_synthesizes_from_spaceship)
 static_assert(std::__has_default_three_way_comparator<const std::string&, const std::string&>::value);
 static_assert(std::__has_default_three_way_comparator<const std::string&, const std::string_view&>::value);
 static_assert(std::__has_default_three_way_comparator<std::string, std::string_view>::value);


        


More information about the libcxx-commits mailing list