[libcxx-commits] [libcxx] [llvm] [libc++] Update macOS and AppleClang (PR #193711)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 28 08:18:55 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-github-workflow

Author: Nikolas Klauser (philnik777)

<details>
<summary>Changes</summary>

The new AppleClang is only available on macOS 26, so we need to update both.

---

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


41 Files Affected:

- (modified) .github/workflows/libcxx-build-and-test.yaml (+8-8) 
- (modified) libcxx/docs/index.rst (+1-1) 
- (modified) libcxx/include/__configuration/compiler.h (+2-2) 
- (modified) libcxx/test/libcxx/strings/basic.string/nonnull.verify.cpp (+1-1) 
- (modified) libcxx/test/libcxx/strings/string.view/nonnull.verify.cpp (+1-1) 
- (modified) libcxx/test/std/atomics/atomics.types.generic/cas_non_power_of_2.pass.cpp (+1-1) 
- (modified) libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp (+1-1) 
- (modified) libcxx/test/std/input.output/file.streams/c.files/gets-removed.verify.cpp (+3) 
- (modified) libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable_with.compile.pass.cpp (+1-1) 
- (modified) libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp (+1-1) 
- (modified) libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp (+1-1) 
- (modified) libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp (+3) 
- (modified) libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp (+3) 
- (modified) libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp (+10) 
- (modified) libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp (+7-1) 
- (modified) libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.nonmembers/ostream.pass.cpp (+4-18) 
- (modified) libcxx/test/std/time/time.cal/time.cal.mdlast/ostream.pass.cpp (+6-33) 
- (modified) libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/ostream.pass.cpp (+6-33) 
- (modified) libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/ostream.pass.cpp (+6-84) 
- (modified) libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/ostream.pass.cpp (+6-81) 
- (modified) libcxx/test/std/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/ostream.pass.cpp (-16) 
- (modified) libcxx/test/std/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/ostream.pass.cpp (-11) 
- (modified) libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/ostream.pass.cpp (-11) 
- (modified) libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/ostream.pass.cpp (+5-52) 
- (modified) libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/ostream.pass.cpp (+7-75) 
- (modified) libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/ostream.pass.cpp (+4-57) 
- (modified) libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/ostream.pass.cpp (+4-48) 
- (modified) libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp (+4-34) 
- (modified) libcxx/test/std/time/time.syn/formatter.local_time.pass.cpp (+3-33) 
- (modified) libcxx/test/std/time/time.syn/formatter.month.pass.cpp (+7-35) 
- (modified) libcxx/test/std/time/time.syn/formatter.month_day.pass.cpp (+13-101) 
- (modified) libcxx/test/std/time/time.syn/formatter.month_day_last.pass.cpp (+4-79) 
- (modified) libcxx/test/std/time/time.syn/formatter.month_weekday.pass.cpp (+4-119) 
- (modified) libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp (+3-33) 
- (modified) libcxx/test/std/time/time.syn/formatter.weekday.pass.cpp (-12) 
- (modified) libcxx/test/std/time/time.syn/formatter.weekday_index.pass.cpp (-32) 
- (modified) libcxx/test/std/time/time.syn/formatter.weekday_last.pass.cpp (-27) 
- (modified) libcxx/test/std/time/time.syn/formatter.year_month.pass.cpp (+3-39) 
- (modified) libcxx/test/std/time/time.syn/formatter.year_month_day.pass.cpp (+13-101) 
- (modified) libcxx/test/std/time/time.syn/formatter.year_month_day_last.pass.cpp (+4-92) 
- (modified) libcxx/test/std/time/time.syn/formatter.year_month_weekday.pass.cpp (+1-28) 


``````````diff
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index 6e6b5fca8ce98..f02f3ae5b0782 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -198,13 +198,13 @@ jobs:
       matrix:
         include:
         - config: generic-cxx03
-          os: macos-15
+          os: macos-26
         - config: generic-cxx23
-          os: macos-15
+          os: macos-26
         - config: generic-modules
-          os: macos-15
+          os: macos-26
         - config: apple-configuration
-          os: macos-15
+          os: macos-26
         # TODO: These jobs are intended to test back-deployment (building against ToT libc++ but running against an
         #       older system-provided libc++.dylib). Doing this properly would require building the test suite on a
         #       recent macOS using a recent Clang (hence recent Xcode), and then running the actual test suite on an
@@ -216,9 +216,9 @@ jobs:
         #       macOS versions as a way to avoid rotting that configuration, but it doesn't provide a lot of additional
         #       coverage.
         - config: apple-system
-          os: macos-15
+          os: macos-26
         - config: apple-system-hardened
-          os: macos-15
+          os: macos-26
     runs-on: ${{ matrix.os }}
     steps:
       - uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -226,8 +226,8 @@ jobs:
           persist-credentials: false
       - uses: maxim-lobanov/setup-xcode at ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0
         with:
-          # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
-          xcode-version: '26.0'
+          # https://github.com/actions/runner-images/blob/main/images/macos/macos-26-Readme.md
+          xcode-version: '26.4'
       - name: Build and test
         run: |
           python3 -m venv .venv
diff --git a/libcxx/docs/index.rst b/libcxx/docs/index.rst
index 266f8c1b8ca04..38f77580d4530 100644
--- a/libcxx/docs/index.rst
+++ b/libcxx/docs/index.rst
@@ -132,7 +132,7 @@ velocity, libc++ drops support for older compilers as newer ones are released.
 Compiler     Versions            Restrictions               Support policy
 ============ =================== ========================== =====================
 Clang        21, 22, 23-git                                 latest two stable releases per `LLVM's release page <https://releases.llvm.org>`_ and the development version
-AppleClang   26.0                                           latest stable release per `Xcode's release page <https://developer.apple.com/documentation/xcode-release-notes>`_
+AppleClang   26.4                                           latest stable release per `Xcode's release page <https://developer.apple.com/documentation/xcode-release-notes>`_
 Open XL      17.1.4 (AIX)                                   latest stable release per `Open XL's documentation page <https://www.ibm.com/docs/en/openxl-c-and-cpp-aix>`_
 GCC          15                  In C++11 or later only     latest stable release per `GCC's release page <https://gcc.gnu.org/releases.html>`_
 ============ =================== ========================== =====================
diff --git a/libcxx/include/__configuration/compiler.h b/libcxx/include/__configuration/compiler.h
index 6ee7400cd1755..4c3dbbfc7d412 100644
--- a/libcxx/include/__configuration/compiler.h
+++ b/libcxx/include/__configuration/compiler.h
@@ -37,8 +37,8 @@
 #      warning "Libc++ only supports Clang 21 and later"
 #    endif
 #  elif defined(_LIBCPP_APPLE_CLANG_VER)
-#    if _LIBCPP_APPLE_CLANG_VER < 1700
-#      warning "Libc++ only supports AppleClang 26 and later"
+#    if _LIBCPP_APPLE_CLANG_VER < 2100
+#      warning "Libc++ only supports AppleClang 26.4 and later"
 #    endif
 #  elif defined(_LIBCPP_GCC_VER)
 #    if _LIBCPP_GCC_VER < 1500
diff --git a/libcxx/test/libcxx/strings/basic.string/nonnull.verify.cpp b/libcxx/test/libcxx/strings/basic.string/nonnull.verify.cpp
index 306f318b9649d..d51ce1fcf2ba6 100644
--- a/libcxx/test/libcxx/strings/basic.string/nonnull.verify.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/nonnull.verify.cpp
@@ -11,7 +11,7 @@
 // Ensure that APIs which take a CharT* are diagnosing passing a nullptr to them
 
 // AppleClang doesn't have diagnose_if with diagnostic flags
-// UNSUPPORTED: apple-clang-17
+// UNSUPPORTED: apple-clang-21
 
 // ADDITIONAL_COMPILE_FLAGS: -Wno-unused-result
 
diff --git a/libcxx/test/libcxx/strings/string.view/nonnull.verify.cpp b/libcxx/test/libcxx/strings/string.view/nonnull.verify.cpp
index ffe048730e687..cac8ca81b1a1b 100644
--- a/libcxx/test/libcxx/strings/string.view/nonnull.verify.cpp
+++ b/libcxx/test/libcxx/strings/string.view/nonnull.verify.cpp
@@ -11,7 +11,7 @@
 // Ensure that APIs which take a CharT* are diagnosing passing a nullptr to them
 
 // AppleClang doesn't have diagnose_if with diagnostic flags
-// UNSUPPORTED: apple-clang-17
+// UNSUPPORTED: apple-clang-21
 
 // ADDITIONAL_COMPILE_FLAGS: -Wno-unused-result
 
diff --git a/libcxx/test/std/atomics/atomics.types.generic/cas_non_power_of_2.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/cas_non_power_of_2.pass.cpp
index 098b69c31b829..254899d8f9633 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/cas_non_power_of_2.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/cas_non_power_of_2.pass.cpp
@@ -9,7 +9,7 @@
 // https://github.com/llvm/llvm-project/issues/30023
 // compare exchange does not work with types of which the size is not a power of 2
 
-// XFAIL: clang-21, apple-clang-17
+// XFAIL: clang-21, apple-clang-21
 // UNSUPPORTED: c++03
 
 // TODO: remove the UNSUPPORTED clang-22 once libc++ CI's clang is updated to include
diff --git a/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp b/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp
index 5ac48ccf9ad0f..4bf664b9300bf 100644
--- a/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp
+++ b/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp
@@ -1136,7 +1136,7 @@ static_assert(
 static_assert(check_equality_comparable_with<move_only_equality_with_int, int>());
 static_assert(check_equality_comparable_with<std::unique_ptr<int>, std::nullptr_t>());
 // TODO: Clang is broken, see https://llvm.org/PR171438
-#if defined(TEST_COMPILER_CLANG) && !defined(TEST_COMPILER_APPLE_CLANG)
+#if defined(TEST_COMPILER_CLANG)
 static_assert(check_equality_comparable_with<nonmovable_equality_with_int, int>());
 #else
 static_assert(!check_equality_comparable_with<nonmovable_equality_with_int, int>());
diff --git a/libcxx/test/std/input.output/file.streams/c.files/gets-removed.verify.cpp b/libcxx/test/std/input.output/file.streams/c.files/gets-removed.verify.cpp
index fb49375a21baa..68d5e552c6d68 100644
--- a/libcxx/test/std/input.output/file.streams/c.files/gets-removed.verify.cpp
+++ b/libcxx/test/std/input.output/file.streams/c.files/gets-removed.verify.cpp
@@ -14,4 +14,7 @@
 
 void f(char* str) {
   (void)std::gets(str); // expected-error {{no member named 'gets' in namespace 'std'}}
+
+  // Apple platforms might diagnose `gets` as deprecated
+  // expected-warning@*:* 0-1 {{deprecated}}
 }
diff --git a/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable_with.compile.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable_with.compile.pass.cpp
index 7cd3ad1bbe316..4f16948b4a110 100644
--- a/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable_with.compile.pass.cpp
+++ b/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable_with.compile.pass.cpp
@@ -248,7 +248,7 @@ struct NonMovableIntComparable {
 };
 
 // TODO: Clang is broken, see https://llvm.org/PR171438
-#if defined(TEST_COMPILER_CLANG) && !defined(TEST_COMPILER_APPLE_CLANG)
+#if defined(TEST_COMPILER_CLANG)
 static_assert(check_three_way_comparable_with<NonMovableIntComparable, int>());
 #else
 static_assert(!check_three_way_comparable_with<NonMovableIntComparable, int>());
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
index dc4d8ae2851f4..21bad089ff34d 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
@@ -11,7 +11,7 @@
 // UNSUPPORTED: c++03, c++11
 
 // These compiler versions and platforms don't enable sized deallocation by default.
-// ADDITIONAL_COMPILE_FLAGS(apple-clang-17): -fsized-deallocation
+// ADDITIONAL_COMPILE_FLAGS(apple-clang-21): -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(target=x86_64-w64-windows-gnu): -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(target=i686-w64-windows-gnu): -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(target=aarch64-w64-windows-gnu): -fsized-deallocation
diff --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
index 834c01b2272e2..0c0896e299f4e 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
@@ -11,7 +11,7 @@
 // UNSUPPORTED: c++03, c++11
 
 // These compiler versions and platforms don't enable sized deallocation by default.
-// ADDITIONAL_COMPILE_FLAGS(apple-clang-17): -fsized-deallocation
+// ADDITIONAL_COMPILE_FLAGS(apple-clang-21): -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(target=x86_64-w64-windows-gnu): -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(target=i686-w64-windows-gnu): -fsized-deallocation
 // ADDITIONAL_COMPILE_FLAGS(target=aarch64-w64-windows-gnu): -fsized-deallocation
diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
index 40f1a087567b2..2f46af8db6f55 100644
--- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
@@ -67,6 +67,8 @@ int main(int, char**)
         assert(t.tm_mon == 5);
         assert(err == std::ios_base::eofbit);
     }
+// FIXME: Apple platforms probably changed their localization, which causes this test to fail.
+#ifndef __APPLE__
     {
         const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const char in[] = "\xE5\x85\xAD\xE6\x9C\x88";
@@ -77,6 +79,7 @@ int main(int, char**)
         assert(t.tm_mon == 5);
         assert(err == std::ios_base::eofbit);
     }
+#endif
 
   return 0;
 }
diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
index cee793b1d5539..2e474564106c8 100644
--- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
@@ -77,6 +77,8 @@ int main(int, char**)
         assert(t.tm_mon == 5);
         assert(err == std::ios_base::eofbit);
     }
+// FIXME: Apple platforms probably changed their localization, which causes this test to fail.
+#ifndef __APPLE__
     {
         const my_facet f(LOCALE_zh_CN_UTF_8, 1);
         const wchar_t in[] = L"\x516D\x6708";
@@ -87,6 +89,7 @@ int main(int, char**)
         assert(t.tm_mon == 5);
         assert(err == std::ios_base::eofbit);
     }
+#endif
 
   return 0;
 }
diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
index 03729ed68dc5c..ce6bdd615331d 100644
--- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
@@ -94,6 +94,9 @@ int main(int, char**)
         assert(t.tm_hour == 23);
         assert(err == std::ios_base::eofbit);
     }
+    // FIXME: Apple platforms probably changed their localization, which causes this test to fail.
+    // clang-format off
+#ifndef __APPLE__
     {
         const my_facet f(LOCALE_fr_FR_UTF_8, 1);
 #ifdef _WIN32
@@ -120,6 +123,8 @@ int main(int, char**)
 #endif
         assert(err == std::ios_base::eofbit);
     }
+#endif // __APPLE__
+    // clang-format on
     {
         const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const char in[] = "23:55:59";
@@ -177,6 +182,9 @@ int main(int, char**)
         assert(t.tm_hour == 23);
         assert(err == std::ios_base::eofbit);
     }
+    // FIXME: Apple platforms probably changed their localization, which causes this test to fail.
+    // clang-format off
+#ifndef __APPLE__
     {
         const my_facet f(LOCALE_zh_CN_UTF_8, 1);
 #ifdef TEST_HAS_GLIBC
@@ -217,6 +225,8 @@ int main(int, char**)
         assert(err == std::ios_base::eofbit);
 #endif
     }
+#endif
+    // clang-format on
     {
         const my_facet f(LOCALE_zh_CN_UTF_8, 1);
 #if defined(_WIN32)
diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
index 84cc41817a163..a67ef483c0feb 100644
--- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
@@ -96,6 +96,9 @@ int main(int, char**)
         assert(t.tm_hour == 23);
         assert(err == std::ios_base::eofbit);
     }
+    // FIXME: Apple platforms probably changed their localization, which causes this test to fail.
+    // clang-format off
+#ifndef __APPLE__
     {
         const my_facet f(LOCALE_fr_FR_UTF_8, 1);
 #ifdef _WIN32
@@ -122,6 +125,8 @@ int main(int, char**)
 #endif
         assert(err == std::ios_base::eofbit);
     }
+#endif // __APPLE__
+    // clang-format on
     {
         const my_facet f(LOCALE_fr_FR_UTF_8, 1);
         const wchar_t in[] = L"23:55:59";
@@ -169,7 +174,8 @@ int main(int, char**)
         assert(t.tm_hour == 23);
         assert(err == std::ios_base::eofbit);
     }
-#ifdef __APPLE__
+// FIXME: Apple platforms probably changed their localization, which causes this test to fail.
+#if defined __APPLE__ && 0
     {
         const my_facet f("zh_CN", 1);
         const wchar_t in[] = L"\x516D"
diff --git a/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.nonmembers/ostream.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.nonmembers/ostream.pass.cpp
index 681d97ee2695a..3963eb9199f08 100644
--- a/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.nonmembers/ostream.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.nonmembers/ostream.pass.cpp
@@ -90,49 +90,35 @@ static void test() {
              SV("0 is not a valid month/00 is not a valid day"));
   TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day{std::chrono::month{0}, 1d}),
              SV("0 is not a valid month/01"));
-#if defined(__APPLE__)
-  TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day{std::chrono::month{1}, 255d}),
-             SV("jan/255 is not a valid day"));
-  TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day{std::chrono::month{1}, 31d}), SV("jan/31"));
-  TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day{std::chrono::month{2}, 29d}), SV("fév/29"));
-  TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day{std::chrono::month{6}, 31d}), SV("jui/31"));
-#else  //  defined(__APPLE__)
   TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day{std::chrono::month{1}, 255d}),
              SV("janv./255 is not a valid day"));
   TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day{std::chrono::month{1}, 31d}), SV("janv./31"));
   TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day{std::chrono::month{2}, 29d}), SV("févr./29"));
   TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day{std::chrono::month{6}, 31d}), SV("juin/31"));
-#endif //  defined(__APPLE__)
 
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{0}, 0d}),
              SV("0 is not a valid month/00 is not a valid day"));
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{0}, 1d}),
              SV("0 is not a valid month/01"));
-#if defined(__APPLE__)
-  TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{1}, 255d}),
-             SV(" 1/255 is not a valid day"));
-  TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{1}, 31d}), SV(" 1/31"));
-  TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{2}, 29d}), SV(" 2/29"));
-  TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{6}, 31d}), SV(" 6/31"));
-#elif defined(_WIN32) //  defined(__APPLE__)
+#if defined(_WIN32)
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{1}, 255d}),
              SV("1/255 is not a valid day"));
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{1}, 31d}), SV("1/31"));
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{2}, 29d}), SV("2/29"));
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{6}, 31d}), SV("6/31"));
-#elif defined(_AIX)   //  defined(__APPLE__)
+#elif defined(_AIX)
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{1}, 255d}),
              SV("1月/255 is not a valid day"));
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{1}, 31d}), SV("1月/31"));
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{2}, 29d}), SV("2月/29"));
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{6}, 31d}), SV("6月/31"));
-#else                 //  defined(__APPLE__)
+#else
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{1}, 255d}),
              SV(" 1月/255 is not a valid day"));
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{1}, 31d}), SV(" 1月/31"));
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{2}, 29d}), SV(" 2月/29"));
   TEST_EQUAL(stream_ja_JP_locale<CharT>(std::chrono::month_day{std::chrono::month{6}, 31d}), SV(" 6月/31"));
-#endif                //  defined(__APPLE__)
+#endif
 }
 
 int main(int, char**) {
diff --git a/libcxx/test/std/time/time.cal/time.cal.mdlast/ostream.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.mdlast/ostream.pass.cpp
index a4c9b1f79ee80..83953121d7fd2 100644
--- a/libcxx/test/std/time/time.cal/time.cal.mdlast/ostream.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.mdlast/ostream.pass.cpp
@@ -89,28 +89,14 @@ static void test() {
 
   TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day_last{std::chrono::month{0}}),
              SV("0 is not a valid month/last"));
-#if defined(__APPLE__)
-  TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day_last{std::chrono::month{1}}), SV("jan/last"));
-  TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day_last{std::chrono::month{2}}), SV("fév/last"));
-  TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day_last{std::chrono::month{3}}), SV("mar/last"));
-  TEST_EQUAL(stream_fr_FR_locale<CharT>(std::chrono::month_day...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/193711


More information about the libcxx-commits mailing list