[libcxx-commits] [libcxx] [libc++] Remove the CI job testing Clang 15 (PR #66406)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Sep 25 06:49:32 PDT 2023


https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/66406

>From e39d56ce51daaaeb3a6e198db0e69c28dd24a946 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Thu, 14 Sep 2023 13:32:33 -0400
Subject: [PATCH] [libc++] Remove the CI job testing Clang 15

Since LLVM 17 has been branched and is on the verge of being released,
we can drop the CI job that tests against Clang 15. I think the number
of cherry-picks to `release/17.x` will be a lot smaller now, so keeping
a Clang 15 job around for that purpose seems unnecessary.

As a fly-by, this patch also removes some Clang 15 workarounds and test
suite annotations as we usually do. It also removes some slightly older
gcc test suite annotations that were missed.
---
 libcxx/docs/index.rst                         |  2 +-
 libcxx/include/__ranges/take_while_view.h     | 16 ++--------------
 libcxx/include/__ranges/to.h                  | 13 ++++++-------
 .../fexperimental-library.compile.pass.cpp    |  4 ----
 .../libcxx/gdb/gdb_pretty_printer_test.sh.cpp |  2 +-
 .../support.dynamic/libcpp_deallocate.sh.cpp  |  2 +-
 .../mdspan/mdspan/index_operator.pass.cpp     |  2 +-
 .../support.srcloc/general.pass.cpp           |  1 -
 .../range.filter/iterator/arrow.pass.cpp      |  3 ---
 .../ctad.static.compile.pass.cpp              |  1 -
 .../expected.expected/swap/free.swap.pass.cpp |  2 --
 .../expected.void/swap/free.swap.pass.cpp     |  2 --
 .../ctad.static.compile.pass.cpp              |  1 -
 .../tuple.assign/convert_copy.pass.cpp        |  3 ---
 libcxx/utils/ci/buildkite-pipeline.yml        | 19 -------------------
 15 files changed, 12 insertions(+), 61 deletions(-)

diff --git a/libcxx/docs/index.rst b/libcxx/docs/index.rst
index 83568f6b82042eb..9c2a83bde3c0f4f 100644
--- a/libcxx/docs/index.rst
+++ b/libcxx/docs/index.rst
@@ -116,7 +116,7 @@ velocity, libc++ drops support for older compilers as newer ones are released.
 ============ =============== ========================== =====================
 Compiler     Versions        Restrictions               Support policy
 ============ =============== ========================== =====================
-Clang        15, 16, 17-git                             latest two stable releases per `LLVM's release page <https://releases.llvm.org>`_ and the development version
+Clang        16, 17, 18-git                             latest two stable releases per `LLVM's release page <https://releases.llvm.org>`_ and the development version
 AppleClang   15                                         latest stable release per `Xcode's release page <https://developer.apple.com/documentation/xcode-release-notes>`_
 Open XL      17.1 (AIX)                                 latest stable release per `Open XL's documentation page <https://www.ibm.com/docs/en/openxl-c-and-cpp-aix>`_
 GCC          12              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/__ranges/take_while_view.h b/libcxx/include/__ranges/take_while_view.h
index b4bdd1865de1c52..a6f7f80ca76bfbe 100644
--- a/libcxx/include/__ranges/take_while_view.h
+++ b/libcxx/include/__ranges/take_while_view.h
@@ -41,18 +41,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
-// The spec uses the unnamed requirement inside the `begin` and `end` member functions:
-//     constexpr auto begin() const
-//       requires range<const V> && indirect_unary_predicate<const Pred, iterator_t<const V>>
-// However, due to a clang-14 and clang-15 bug, the above produces a hard error when `const V` is not a range.
-// The workaround is to create a named concept and use the concept instead.
-// As of take_while_view is implemented, the clang-trunk has already fixed the bug.
-// It is OK to remove the workaround once our CI no longer uses clang-14, clang-15 based compilers,
-// because we don't actually expect a lot of vendors to ship a new libc++ with an old clang.
-template <class _View, class _Pred>
-concept __take_while_const_is_range =
-    range<const _View> && indirect_unary_predicate<const _Pred, iterator_t<const _View>>;
-
 template <view _View, class _Pred>
   requires input_range<_View> && is_object_v<_Pred> && indirect_unary_predicate<const _Pred, iterator_t<_View>>
 class take_while_view : public view_interface<take_while_view<_View, _Pred>> {
@@ -87,7 +75,7 @@ class take_while_view : public view_interface<take_while_view<_View, _Pred>> {
   }
 
   _LIBCPP_HIDE_FROM_ABI constexpr auto begin() const
-    requires __take_while_const_is_range<_View, _Pred>
+    requires range<const _View> && indirect_unary_predicate<const _Pred, iterator_t<const _View>>
   {
     return ranges::begin(__base_);
   }
@@ -99,7 +87,7 @@ class take_while_view : public view_interface<take_while_view<_View, _Pred>> {
   }
 
   _LIBCPP_HIDE_FROM_ABI constexpr auto end() const
-    requires __take_while_const_is_range<_View, _Pred>
+    requires range<const _View> && indirect_unary_predicate<const _Pred, iterator_t<const _View>>
   {
     return __sentinel</*_Const=*/true>(ranges::end(__base_), std::addressof(*__pred_));
   }
diff --git a/libcxx/include/__ranges/to.h b/libcxx/include/__ranges/to.h
index 95c300bfa6f204c..a519662e759e16a 100644
--- a/libcxx/include/__ranges/to.h
+++ b/libcxx/include/__ranges/to.h
@@ -44,14 +44,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
-// TODO(clang-15): in the Standard, it's a `constexpr bool` variable, not a concept, but constexpr variables don't
-// short-circuit properly on Clang 15 (fixed in later versions), so use a concept as a workaround.
 template <class _Container>
-concept __reservable_container = sized_range<_Container> && requires(_Container& __c, range_size_t<_Container> __n) {
-  __c.reserve(__n);
-  { __c.capacity() } -> same_as<decltype(__n)>;
-  { __c.max_size() } -> same_as<decltype(__n)>;
-};
+constexpr bool __reservable_container =
+    sized_range<_Container> && requires(_Container& __c, range_size_t<_Container> __n) {
+      __c.reserve(__n);
+      { __c.capacity() } -> same_as<decltype(__n)>;
+      { __c.max_size() } -> same_as<decltype(__n)>;
+    };
 
 template <class _Container, class _Ref>
 constexpr bool __container_insertable = requires(_Container& __c, _Ref&& __ref) {
diff --git a/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp b/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp
index aaf6b0a8ad49a30..92062eb98889e0c 100644
--- a/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp
+++ b/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp
@@ -12,10 +12,6 @@
 // GCC does not support the -fexperimental-library flag
 // UNSUPPORTED: gcc
 
-// Clang on AIX currently pretends that it is Clang 15, even though it is not (as of writing
-// this, LLVM 15 hasn't even been branched yet).
-// UNSUPPORTED: clang-15 && buildhost=aix
-
 // ADDITIONAL_COMPILE_FLAGS: -fexperimental-library
 
 #include <version>
diff --git a/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp b/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
index e342e84e738809d..394a3369e036ed8 100644
--- a/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
+++ b/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
@@ -12,7 +12,7 @@
 // UNSUPPORTED: c++03
 
 // TODO: Investigate these failures which break the CI.
-// UNSUPPORTED: clang-15, clang-16, clang-17, clang-18
+// UNSUPPORTED: clang-16, clang-17, clang-18
 
 // TODO: Investigate this failure on GCC 13 (in Ubuntu Jammy)
 // UNSUPPORTED: gcc-13
diff --git a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
index 12c73e3e3b32c09..3b33737466c7419 100644
--- a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
+++ b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
@@ -19,7 +19,7 @@
 
 // XFAIL: sanitizer-new-delete && !hwasan
 
-// It fails with clang-14 or clang-16, but passes with clang-15.
+// TODO: Investigate this failure
 // UNSUPPORTED: ubsan
 
 // GCC doesn't support the aligned-allocation flags.
diff --git a/libcxx/test/std/containers/views/mdspan/mdspan/index_operator.pass.cpp b/libcxx/test/std/containers/views/mdspan/mdspan/index_operator.pass.cpp
index 5284194632d0f42..9e622d1c01fc007 100644
--- a/libcxx/test/std/containers/views/mdspan/mdspan/index_operator.pass.cpp
+++ b/libcxx/test/std/containers/views/mdspan/mdspan/index_operator.pass.cpp
@@ -38,7 +38,7 @@
 #include "../ConvertibleToIntegral.h"
 #include "CustomTestLayouts.h"
 
-// Clang 15 and 16 do not support argument packs as input to operator []
+// Clang 16 does not support argument packs as input to operator []
 #if defined(__clang_major__) && __clang_major__ < 17
 template <class MDS>
 constexpr auto& access(MDS mds) {
diff --git a/libcxx/test/std/language.support/support.srcloc/general.pass.cpp b/libcxx/test/std/language.support/support.srcloc/general.pass.cpp
index 852aa0c7c37d08d..3d9b913053da3e4 100644
--- a/libcxx/test/std/language.support/support.srcloc/general.pass.cpp
+++ b/libcxx/test/std/language.support/support.srcloc/general.pass.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: clang-15
 
 #include <source_location>
 
diff --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/arrow.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/arrow.pass.cpp
index bd1f4ec481393b9..587ecfa2a3e2b59 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/arrow.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/arrow.pass.cpp
@@ -6,9 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// This test is hitting Clang bugs with LSV in older versions of Clang.
-// UNSUPPORTED: clang-modules-build && clang-15
-
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 
 // constexpr iterator_t<V> operator->() const
diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctad.static.compile.pass.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctad.static.compile.pass.cpp
index b1a218a5f0f1466..73f6c4412576569 100644
--- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctad.static.compile.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctad.static.compile.pass.cpp
@@ -8,7 +8,6 @@
 
 // UNSUPPORTED: no-threads
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// XFAIL: clang-15
 
 // checks that CTAD for std::packaged_task works properly with static operator() overloads
 
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 ca0dd3e66a596ee..15c66d2b75076eb 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
@@ -6,8 +6,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// Older Clangs do not support the C++20 feature to constrain destructors
-// XFAIL: clang-15
 
 // friend constexpr void swap(expected& x, expected& y) noexcept(noexcept(x.swap(y)));
 
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 4e2a1967c9f4bee..ad1eb3f0bd20d04 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
@@ -6,8 +6,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// Older Clangs do not support the C++20 feature to constrain destructors
-// XFAIL: clang-15
 
 // friend constexpr void swap(expected& x, expected& y) noexcept(noexcept(swap(x,y)));
 
diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/ctad.static.compile.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/ctad.static.compile.pass.cpp
index 3b7bb796dedf3fa..4f8ddd9219b1514 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/ctad.static.compile.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/ctad.static.compile.pass.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// XFAIL: clang-15
 
 // checks that CTAD for std::function works properly with static operator() overloads
 
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp
index c1d3659e81f005d..d2b555149768570 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp
@@ -6,9 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Triggers a Clang assertion: llvm.org/PR45879
-// UNSUPPORTED: clang-15
-
 // <tuple>
 
 // template <class... Types> class tuple;
diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index f2329457c7bd938..6693f7b63354c93 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -289,25 +289,6 @@ steps:
           limit: 2
     timeout_in_minutes: 120
 
-  - label: "Clang 15"
-    command: "libcxx/utils/ci/run-buildbot generic-cxx23"
-    artifact_paths:
-      - "**/test-results.xml"
-      - "**/*.abilist"
-    env:
-        CC: "clang-15"
-        CXX: "clang++-15"
-        ENABLE_CLANG_TIDY: "On"
-        ENABLE_STD_MODULES: "Off"
-    agents:
-      queue: "libcxx-builders"
-      os: "linux"
-    retry:
-      automatic:
-        - exit_status: -1  # Agent was lost
-          limit: 2
-    timeout_in_minutes: 120
-
   - label: "Clang 16"
     command: "libcxx/utils/ci/run-buildbot generic-cxx23"
     artifact_paths:



More information about the libcxx-commits mailing list