-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[libc++] Update the CI to Clang-20 and drop Clang-17 support #117429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
You can test this locally with the following command:darker --check --diff -r b968fd95026639a2a1d2057627b41622f3b5c97d...1e7945f0d5544b6400cd171661052ad2a71b9f2a libcxx/test/libcxx/clang_tidy.gen.py View the diff from darker here.--- clang_tidy.gen.py 2025-01-28 08:21:04.000000 +0000
+++ clang_tidy.gen.py 2025-01-28 08:25:09.411445 +0000
@@ -16,11 +16,12 @@
import sys
sys.path.append(sys.argv[1])
from libcxx.header_information import lit_header_restrictions, lit_header_undeprecations, public_headers
for header in public_headers:
- print(f"""\
+ print(
+ f"""\
//--- {header}.sh.cpp
// REQUIRES: has-clang-tidy
// The GCC compiler flags are not always compatible with clang-tidy.
@@ -31,6 +32,7 @@
// TODO: run clang-tidy with modules enabled once they are supported
// RUN: %{{clang-tidy}} %s --warnings-as-errors=* -header-filter=.* --config-file=%{{libcxx-dir}}/.clang-tidy --load=%{{test-tools-dir}}/clang_tidy_checks/libcxx-tidy.plugin -- -Wweak-vtables %{{compile_flags}} -fno-modules
#include <{header}>
-""")
+"""
+ )
|
f2f373d
to
d272a37
Compare
You can test this locally with the following command:git-clang-format --diff b968fd95026639a2a1d2057627b41622f3b5c97d 1e7945f0d5544b6400cd171661052ad2a71b9f2a --extensions cpp,h -- libcxx/include/__configuration/compiler.h libcxx/include/__cxx03/__memory/uninitialized_algorithms.h libcxx/include/__type_traits/promote.h libcxx/src/experimental/time_zone.cpp libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp libcxx/test/libcxx/ranges/range.adaptors/range.split/no_unique_address.compile.pass.cpp libcxx/test/libcxx/ranges/range.factories/range.istream.view/no_unique_address.compile.pass.cpp libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp libcxx/test/std/containers/views/mdspan/mdspan/index_operator.pass.cpp libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp libcxx/test/std/experimental/simd/simd.class/simd_copy.pass.cpp libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp libcxx/test/std/numerics/c.math/signbit.pass.cpp libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.copy.pass.cpp libcxx/test/std/utilities/format/format.arguments/format.arg/visit.pass.cpp libcxx/test/std/utilities/format/format.arguments/format.arg/visit.return_type.pass.cpp libcxx/test/std/utilities/format/format.arguments/format.arg/visit_format_arg.deprecated.verify.cpp libcxx/test/std/utilities/meta/meta.rel/is_virtual_base_of.pass.cpp libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.verify.cpp libcxx/test/std/utilities/utility/pairs/pairs.pair/nttp.equivalence.compile.pass.cpp libcxx/test/std/utilities/utility/pairs/pairs.pair/nttp.verify.cpp libcxx/test/std/utilities/variant/variant.visit.member/robust_against_adl.pass.cpp libcxx/test/std/utilities/variant/variant.visit.member/visit.pass.cpp libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp View the diff from clang-format here.diff --git a/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
index 5bbdf3ce2a..2b4d856eea 100644
--- a/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
@@ -93,8 +93,8 @@ constexpr bool testSpan()
assert(s3.data() == val && s3.size() == 2);
assert(s4.data() == val && s4.size() == 2);
-TEST_DIAGNOSTIC_PUSH
-TEST_CLANG_DIAGNOSTIC_IGNORED("-Wdangling")
+ TEST_DIAGNOSTIC_PUSH
+ TEST_CLANG_DIAGNOSTIC_IGNORED("-Wdangling")
std::span<const int> s5 = {{1,2}};
#if TEST_STD_VER >= 26
std::span<const int, 2> s6({1, 2});
@@ -103,7 +103,7 @@ TEST_CLANG_DIAGNOSTIC_IGNORED("-Wdangling")
#endif
assert(s5.size() == 2); // and it dangles
assert(s6.size() == 2); // and it dangles
-TEST_DIAGNOSTIC_POP
+ TEST_DIAGNOSTIC_POP
return true;
}
|
d272a37
to
8604e7a
Compare
3c33154
to
1e7945f
Compare
1e7945f
to
dc11020
Compare
@llvm/pr-subscribers-libcxx Author: Nikolas Klauser (philnik777) ChangesPatch is 28.15 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/117429.diff 34 Files Affected:
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index a28bf4d5daf6d5..ee77e83363d37a 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -48,8 +48,8 @@ jobs:
'generic-cxx26',
'generic-modules'
]
- cc: [ 'clang-19' ]
- cxx: [ 'clang++-19' ]
+ cc: [ 'clang-20' ]
+ cxx: [ 'clang++-20' ]
include:
- config: 'generic-gcc'
cc: 'gcc-14'
@@ -88,18 +88,18 @@ jobs:
'generic-cxx20',
'generic-cxx23'
]
- cc: [ 'clang-19' ]
- cxx: [ 'clang++-19' ]
+ cc: [ 'clang-20' ]
+ cxx: [ 'clang++-20' ]
include:
- config: 'generic-gcc-cxx11'
cc: 'gcc-14'
cxx: 'g++-14'
- config: 'generic-cxx23'
- cc: 'clang-17'
- cxx: 'clang++-17'
- - config: 'generic-cxx26'
cc: 'clang-18'
cxx: 'clang++-18'
+ - config: 'generic-cxx26'
+ cc: 'clang-19'
+ cxx: 'clang++-19'
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.config }}
@@ -169,8 +169,8 @@ jobs:
- name: ${{ matrix.config }}
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
env:
- CC: clang-19
- CXX: clang++-19
+ CC: clang-20
+ CXX: clang++-20
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
if: always()
with:
diff --git a/libcxx/include/__configuration/compiler.h b/libcxx/include/__configuration/compiler.h
index 80ece22bb50bd6..cf459a0619b23c 100644
--- a/libcxx/include/__configuration/compiler.h
+++ b/libcxx/include/__configuration/compiler.h
@@ -33,8 +33,8 @@
// Warn if a compiler version is used that is not supported anymore
// LLVM RELEASE Update the minimum compiler versions
# if defined(_LIBCPP_CLANG_VER)
-# if _LIBCPP_CLANG_VER < 1700
-# warning "Libc++ only supports Clang 17 and later"
+# if _LIBCPP_CLANG_VER < 1800
+# warning "Libc++ only supports Clang 18 and later"
# endif
# elif defined(_LIBCPP_APPLE_CLANG_VER)
# if _LIBCPP_APPLE_CLANG_VER < 1500
diff --git a/libcxx/include/__cxx03/__memory/uninitialized_algorithms.h b/libcxx/include/__cxx03/__memory/uninitialized_algorithms.h
index d595c8c6cf49eb..7a7cc64f08ab39 100644
--- a/libcxx/include/__cxx03/__memory/uninitialized_algorithms.h
+++ b/libcxx/include/__cxx03/__memory/uninitialized_algorithms.h
@@ -642,7 +642,8 @@ __uninitialized_allocator_relocate(_Alloc& __alloc, _Tp* __first, _Tp* __last, _
__guard.__complete();
std::__allocator_destroy(__alloc, __first, __last);
} else {
- __builtin_memcpy(const_cast<__remove_const_t<_Tp>*>(__result), __first, sizeof(_Tp) * (__last - __first));
+ // Casting to void* to suppress clang complaining that this is technically UB.
+ __builtin_memcpy(static_cast<void*>(__result), __first, sizeof(_Tp) * (__last - __first));
}
}
diff --git a/libcxx/include/__type_traits/promote.h b/libcxx/include/__type_traits/promote.h
index 0f545bc507398f..b449a749004ab5 100644
--- a/libcxx/include/__type_traits/promote.h
+++ b/libcxx/include/__type_traits/promote.h
@@ -13,20 +13,12 @@
#include <__type_traits/integral_constant.h>
#include <__type_traits/is_arithmetic.h>
-#if defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER == 1700
-# include <__type_traits/is_same.h>
-# include <__utility/declval.h>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
-// TODO(LLVM-20): Remove this workaround
-#if !defined(_LIBCPP_CLANG_VER) || _LIBCPP_CLANG_VER != 1700
-
template <class... _Args>
class __promote {
static_assert((is_arithmetic<_Args>::value && ...));
@@ -39,10 +31,10 @@ class __promote {
static double __test(unsigned long);
static double __test(long long);
static double __test(unsigned long long);
-# if _LIBCPP_HAS_INT128
+#if _LIBCPP_HAS_INT128
static double __test(__int128_t);
static double __test(__uint128_t);
-# endif
+#endif
static double __test(double);
static long double __test(long double);
@@ -50,79 +42,6 @@ class __promote {
using type = decltype((__test(_Args()) + ...));
};
-#else
-
-template <class _Tp>
-struct __numeric_type {
- static void __test(...);
- static float __test(float);
- static double __test(char);
- static double __test(int);
- static double __test(unsigned);
- static double __test(long);
- static double __test(unsigned long);
- static double __test(long long);
- static double __test(unsigned long long);
-# if _LIBCPP_HAS_INT128
- static double __test(__int128_t);
- static double __test(__uint128_t);
-# endif
- static double __test(double);
- static long double __test(long double);
-
- typedef decltype(__test(std::declval<_Tp>())) type;
- static const bool value = _IsNotSame<type, void>::value;
-};
-
-template <>
-struct __numeric_type<void> {
- static const bool value = true;
-};
-
-template <class _A1,
- class _A2 = void,
- class _A3 = void,
- bool = __numeric_type<_A1>::value && __numeric_type<_A2>::value && __numeric_type<_A3>::value>
-class __promote_imp {
-public:
- static const bool value = false;
-};
-
-template <class _A1, class _A2, class _A3>
-class __promote_imp<_A1, _A2, _A3, true> {
-private:
- typedef typename __promote_imp<_A1>::type __type1;
- typedef typename __promote_imp<_A2>::type __type2;
- typedef typename __promote_imp<_A3>::type __type3;
-
-public:
- typedef decltype(__type1() + __type2() + __type3()) type;
- static const bool value = true;
-};
-
-template <class _A1, class _A2>
-class __promote_imp<_A1, _A2, void, true> {
-private:
- typedef typename __promote_imp<_A1>::type __type1;
- typedef typename __promote_imp<_A2>::type __type2;
-
-public:
- typedef decltype(__type1() + __type2()) type;
- static const bool value = true;
-};
-
-template <class _A1>
-class __promote_imp<_A1, void, void, true> {
-public:
- typedef typename __numeric_type<_A1>::type type;
- static const bool value = true;
-};
-
-template <class _A1, class _A2 = void, class _A3 = void>
-class __promote : public __promote_imp<_A1, _A2, _A3> {};
-
-#endif // !defined(_LIBCPP_CLANG_VER) || _LIBCPP_CLANG_VER >= 1700
-
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___TYPE_TRAITS_PROMOTE_H
diff --git a/libcxx/src/experimental/time_zone.cpp b/libcxx/src/experimental/time_zone.cpp
index 764a89ab513c86..f7d82a5d4cfc30 100644
--- a/libcxx/src/experimental/time_zone.cpp
+++ b/libcxx/src/experimental/time_zone.cpp
@@ -199,7 +199,7 @@ __format(const __tz::__continuation& __continuation, const string& __letters, se
// active at the end. This should be determined separately.
return chrono::seconds{0};
else
- static_assert(sizeof(_Tp) == 0); // TODO TZDB static_assert(false); after droping clang-16 support
+ static_assert(false);
std::__libcpp_unreachable();
},
@@ -225,7 +225,7 @@ __format(const __tz::__continuation& __continuation, const string& __letters, se
else if constexpr (same_as<_Tp, __tz::__constrained_weekday>)
return __value(__year, __month);
else
- static_assert(sizeof(_Tp) == 0); // TODO TZDB static_assert(false); after droping clang-16 support
+ static_assert(false);
std::__libcpp_unreachable();
},
@@ -688,7 +688,7 @@ __get_sys_info(sys_seconds __time,
else if constexpr (same_as<_Tp, __tz::__save>)
return chrono::__get_sys_info_basic(__time, __continuation_begin, __continuation, __value.__time);
else
- static_assert(sizeof(_Tp) == 0); // TODO TZDB static_assert(false); after droping clang-16 support
+ static_assert(false);
std::__libcpp_unreachable();
},
diff --git a/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp b/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp
index 2790916edaf698..1b0b945f337005 100644
--- a/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp
+++ b/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp
@@ -6,11 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// This test fails with Clang <18 because diagnose_if doesn't emit all of the
-// diagnostics when -fdelayed-template-parsing is enabled, like it is in MSVC
-// mode.
-// XFAIL: msvc && clang-17
-
// REQUIRES: diagnose-if-support
// <atomic>
diff --git a/libcxx/test/libcxx/clang_tidy.gen.py b/libcxx/test/libcxx/clang_tidy.gen.py
index 06f277e901d335..f1135749febe45 100644
--- a/libcxx/test/libcxx/clang_tidy.gen.py
+++ b/libcxx/test/libcxx/clang_tidy.gen.py
@@ -26,9 +26,6 @@
// The GCC compiler flags are not always compatible with clang-tidy.
// UNSUPPORTED: gcc
-// Clang 17 has false positives.
-// UNSUPPORTED: clang-17
-
{lit_header_restrictions.get(header, '')}
{lit_header_undeprecations.get(header, '')}
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 ff951d94db0a49..6509bb58140abd 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-17, clang-18, clang-19
+// UNSUPPORTED: clang-18, clang-19, clang-20
// The Android libc++ tests are run on a non-Android host, connected to an
// Android device over adb. gdb needs special support to make this work (e.g.
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp
index a0bfb7c4a246b5..4a975f472b8287 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: msvc && clang-17
// class lazy_split_view {
// _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.split/no_unique_address.compile.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.split/no_unique_address.compile.pass.cpp
index 694cf1fd0d0e4c..7950827dcc8681 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.split/no_unique_address.compile.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.split/no_unique_address.compile.pass.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: msvc && clang-17
// class split_view {
// _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
diff --git a/libcxx/test/libcxx/ranges/range.factories/range.istream.view/no_unique_address.compile.pass.cpp b/libcxx/test/libcxx/ranges/range.factories/range.istream.view/no_unique_address.compile.pass.cpp
index a77c4e4d1bcdb0..56d973d411408f 100644
--- a/libcxx/test/libcxx/ranges/range.factories/range.istream.view/no_unique_address.compile.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.factories/range.istream.view/no_unique_address.compile.pass.cpp
@@ -8,7 +8,6 @@
// UNSUPPORTED: no-localization
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: msvc && clang-17
// Test the libc++ extension that the value stored in `std::ranges::istream_view` has been marked
// as _LIBCPP_NO_UNIQUE_ADDRESS
@@ -21,4 +20,3 @@ struct Empty {
};
static_assert(sizeof(std::ranges::istream_view<Empty>) == sizeof(void*));
-
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
index c7a797171e0a7a..b162c2da4f337a 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
@@ -10,7 +10,7 @@
// Older versions of clang have a bug with atomic builtins affecting double and long double.
// Fixed by 5fdd0948.
-// XFAIL: target=powerpc-ibm-{{.*}} && (clang-17 || clang-18)
+// XFAIL: target=powerpc-ibm-{{.*}} && clang-18
// https://github.com/llvm/llvm-project/issues/72893
// XFAIL: target={{x86_64-.*}} && tsan
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
index 00d43a61acc69c..8784037aa5e820 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
@@ -10,7 +10,7 @@
// Older versions of clang have a bug with atomic builtins affecting double and long double.
// Fixed by 5fdd0948.
-// XFAIL: target=powerpc-ibm-{{.*}} && (clang-17 || clang-18)
+// XFAIL: target=powerpc-ibm-{{.*}} && clang-18
// https://github.com/llvm/llvm-project/issues/72893
// XFAIL: target={{x86_64-.*}} && tsan
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
index 5dddb7c5472e17..e0e079436075fb 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
@@ -10,7 +10,7 @@
// Older versions of clang have a bug with atomic builtins affecting double and long double.
// Fixed by 5fdd0948.
-// XFAIL: target=powerpc-ibm-{{.*}} && (clang-17 || clang-18)
+// XFAIL: target=powerpc-ibm-{{.*}} && clang-18
// floating-point-type operator-=(floating-point-type) volatile noexcept;
// floating-point-type operator-=(floating-point-type) noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
index cf7b494a3a800f..7e2c10106e9ab0 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
@@ -10,7 +10,7 @@
// Older versions of clang have a bug with atomic builtins affecting double and long double.
// Fixed by 5fdd0948.
-// XFAIL: target=powerpc-ibm-{{.*}} && (clang-17 || clang-18)
+// XFAIL: target=powerpc-ibm-{{.*}} && clang-18
// floating-point-type operator+=(floating-point-type) volatile noexcept;
// floating-point-type operator+=(floating-point-type) noexcept;
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 22020b1f64881c..9124bd23148065 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
@@ -39,8 +39,8 @@
#include "../ConvertibleToIntegral.h"
#include "../CustomTestLayouts.h"
-// Clang 16 does not support argument packs as input to operator []
-#if defined(__clang_major__) && __clang_major__ < 17
+// Apple Clang does not support argument packs as input to operator []
+#ifdef TEST_COMPILER_APPLE_CLANG
template <class MDS>
constexpr auto& access(MDS mds) {
return mds[];
@@ -84,7 +84,7 @@ template <class MDS, class... Args>
constexpr void iterate(MDS mds, Args... args) {
constexpr int r = static_cast<int>(MDS::extents_type::rank()) - 1 - static_cast<int>(sizeof...(Args));
if constexpr (-1 == r) {
-#if defined(__clang_major__) && __clang_major__ < 17
+#ifdef TEST_COMPILER_APPLE_CLANG
int* ptr1 = &access(mds, args...);
#else
int* ptr1 = &mds[args...];
diff --git a/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
index c02f42400b6e1e..988ecbc11af363 100644
--- a/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
@@ -93,7 +93,9 @@ constexpr bool testSpan()
assert(s3.data() == val && s3.size() == 2);
assert(s4.data() == val && s4.size() == 2);
- std::span<const int> s5 = {{1,2}};
+ TEST_DIAGNOSTIC_PUSH
+ TEST_CLANG_DIAGNOSTIC_IGNORED("-Wdangling")
+ std::span<const int> s5 = {{1, 2}};
#if TEST_STD_VER >= 26
std::span<const int, 2> s6({1, 2});
#else
@@ -101,6 +103,7 @@ constexpr bool testSpan()
#endif
assert(s5.size() == 2); // and it dangles
assert(s6.size() == 2); // and it dangles
+ TEST_DIAGNOSTIC_POP
return true;
}
diff --git a/libcxx/test/std/experimental/simd/simd.class/simd_copy.pass.cpp b/libcxx/test/std/experimental/simd/simd.class/simd_copy.pass.cpp
index 7d91ca0eada1d3..6929831eca3612 100644
--- a/libcxx/test/std/experimental/simd/simd.class/simd_copy.pass.cpp
+++ b/libcxx/test/std/experimental/simd/simd.class/simd_copy.pass.cpp
@@ -10,7 +10,7 @@
// Older versions of clang may encounter a backend error (see 0295c2ad):
// Pass-by-value arguments with alignment greater than register width are not supported.
-// XFAIL: target=powerpc{{.*}}-ibm-{{.*}} && (clang-17 || clang-18)
+// XFAIL: target=powerpc{{.*}}-ibm-{{.*}} && clang-18
// <experimental/simd>
//
diff --git a/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp b/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp
index 17ecfd3b50d255..eb88d90ca18bd4 100644
--- a/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp
+++ b/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp
@@ -10,7 +10,7 @@
// Older versions of clang may encounter a backend error (see 0295c2ad):
// Pass-by-value arguments with alignment greater than register width are not supported.
-// XFAIL: target=powerpc{{.*}}-ibm-{{.*}} && (clang-17 || clang-18)
+// XFAIL: target=powerpc{{.*}}-ibm-{{.*}} && clang-18
// This test crashes AppleClang 15 but not later versions.
// UNSUPPORTED: apple-clang-15
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 f0ad2c0e67df32..1d763d6caba6a5 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,6 @@
// UNSUPPORTED: c++03, c++11
// These compiler versions and platforms don't enable sized deallocation by default.
-// ADDITIONAL_COMPILE_FLAGS(clang-17): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(clang-18): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple-clang-15): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple-clang-16): -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 fd52df451afc81..462037e53374bf 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,6 @@
// UNSUPPORTED: c++03, c++11
// These compiler versions and platforms don't enable sized deallocation by default.
-// ADDITIONAL_COMPILE_FLAGS(clang-17): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(clang-18): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple-clang-15): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple...
[truncated]
|
@llvm/pr-subscribers-github-workflow Author: Nikolas Klauser (philnik777) ChangesPatch is 28.15 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/117429.diff 34 Files Affected:
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index a28bf4d5daf6d5..ee77e83363d37a 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -48,8 +48,8 @@ jobs:
'generic-cxx26',
'generic-modules'
]
- cc: [ 'clang-19' ]
- cxx: [ 'clang++-19' ]
+ cc: [ 'clang-20' ]
+ cxx: [ 'clang++-20' ]
include:
- config: 'generic-gcc'
cc: 'gcc-14'
@@ -88,18 +88,18 @@ jobs:
'generic-cxx20',
'generic-cxx23'
]
- cc: [ 'clang-19' ]
- cxx: [ 'clang++-19' ]
+ cc: [ 'clang-20' ]
+ cxx: [ 'clang++-20' ]
include:
- config: 'generic-gcc-cxx11'
cc: 'gcc-14'
cxx: 'g++-14'
- config: 'generic-cxx23'
- cc: 'clang-17'
- cxx: 'clang++-17'
- - config: 'generic-cxx26'
cc: 'clang-18'
cxx: 'clang++-18'
+ - config: 'generic-cxx26'
+ cc: 'clang-19'
+ cxx: 'clang++-19'
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.config }}
@@ -169,8 +169,8 @@ jobs:
- name: ${{ matrix.config }}
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
env:
- CC: clang-19
- CXX: clang++-19
+ CC: clang-20
+ CXX: clang++-20
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
if: always()
with:
diff --git a/libcxx/include/__configuration/compiler.h b/libcxx/include/__configuration/compiler.h
index 80ece22bb50bd6..cf459a0619b23c 100644
--- a/libcxx/include/__configuration/compiler.h
+++ b/libcxx/include/__configuration/compiler.h
@@ -33,8 +33,8 @@
// Warn if a compiler version is used that is not supported anymore
// LLVM RELEASE Update the minimum compiler versions
# if defined(_LIBCPP_CLANG_VER)
-# if _LIBCPP_CLANG_VER < 1700
-# warning "Libc++ only supports Clang 17 and later"
+# if _LIBCPP_CLANG_VER < 1800
+# warning "Libc++ only supports Clang 18 and later"
# endif
# elif defined(_LIBCPP_APPLE_CLANG_VER)
# if _LIBCPP_APPLE_CLANG_VER < 1500
diff --git a/libcxx/include/__cxx03/__memory/uninitialized_algorithms.h b/libcxx/include/__cxx03/__memory/uninitialized_algorithms.h
index d595c8c6cf49eb..7a7cc64f08ab39 100644
--- a/libcxx/include/__cxx03/__memory/uninitialized_algorithms.h
+++ b/libcxx/include/__cxx03/__memory/uninitialized_algorithms.h
@@ -642,7 +642,8 @@ __uninitialized_allocator_relocate(_Alloc& __alloc, _Tp* __first, _Tp* __last, _
__guard.__complete();
std::__allocator_destroy(__alloc, __first, __last);
} else {
- __builtin_memcpy(const_cast<__remove_const_t<_Tp>*>(__result), __first, sizeof(_Tp) * (__last - __first));
+ // Casting to void* to suppress clang complaining that this is technically UB.
+ __builtin_memcpy(static_cast<void*>(__result), __first, sizeof(_Tp) * (__last - __first));
}
}
diff --git a/libcxx/include/__type_traits/promote.h b/libcxx/include/__type_traits/promote.h
index 0f545bc507398f..b449a749004ab5 100644
--- a/libcxx/include/__type_traits/promote.h
+++ b/libcxx/include/__type_traits/promote.h
@@ -13,20 +13,12 @@
#include <__type_traits/integral_constant.h>
#include <__type_traits/is_arithmetic.h>
-#if defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER == 1700
-# include <__type_traits/is_same.h>
-# include <__utility/declval.h>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
-// TODO(LLVM-20): Remove this workaround
-#if !defined(_LIBCPP_CLANG_VER) || _LIBCPP_CLANG_VER != 1700
-
template <class... _Args>
class __promote {
static_assert((is_arithmetic<_Args>::value && ...));
@@ -39,10 +31,10 @@ class __promote {
static double __test(unsigned long);
static double __test(long long);
static double __test(unsigned long long);
-# if _LIBCPP_HAS_INT128
+#if _LIBCPP_HAS_INT128
static double __test(__int128_t);
static double __test(__uint128_t);
-# endif
+#endif
static double __test(double);
static long double __test(long double);
@@ -50,79 +42,6 @@ class __promote {
using type = decltype((__test(_Args()) + ...));
};
-#else
-
-template <class _Tp>
-struct __numeric_type {
- static void __test(...);
- static float __test(float);
- static double __test(char);
- static double __test(int);
- static double __test(unsigned);
- static double __test(long);
- static double __test(unsigned long);
- static double __test(long long);
- static double __test(unsigned long long);
-# if _LIBCPP_HAS_INT128
- static double __test(__int128_t);
- static double __test(__uint128_t);
-# endif
- static double __test(double);
- static long double __test(long double);
-
- typedef decltype(__test(std::declval<_Tp>())) type;
- static const bool value = _IsNotSame<type, void>::value;
-};
-
-template <>
-struct __numeric_type<void> {
- static const bool value = true;
-};
-
-template <class _A1,
- class _A2 = void,
- class _A3 = void,
- bool = __numeric_type<_A1>::value && __numeric_type<_A2>::value && __numeric_type<_A3>::value>
-class __promote_imp {
-public:
- static const bool value = false;
-};
-
-template <class _A1, class _A2, class _A3>
-class __promote_imp<_A1, _A2, _A3, true> {
-private:
- typedef typename __promote_imp<_A1>::type __type1;
- typedef typename __promote_imp<_A2>::type __type2;
- typedef typename __promote_imp<_A3>::type __type3;
-
-public:
- typedef decltype(__type1() + __type2() + __type3()) type;
- static const bool value = true;
-};
-
-template <class _A1, class _A2>
-class __promote_imp<_A1, _A2, void, true> {
-private:
- typedef typename __promote_imp<_A1>::type __type1;
- typedef typename __promote_imp<_A2>::type __type2;
-
-public:
- typedef decltype(__type1() + __type2()) type;
- static const bool value = true;
-};
-
-template <class _A1>
-class __promote_imp<_A1, void, void, true> {
-public:
- typedef typename __numeric_type<_A1>::type type;
- static const bool value = true;
-};
-
-template <class _A1, class _A2 = void, class _A3 = void>
-class __promote : public __promote_imp<_A1, _A2, _A3> {};
-
-#endif // !defined(_LIBCPP_CLANG_VER) || _LIBCPP_CLANG_VER >= 1700
-
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___TYPE_TRAITS_PROMOTE_H
diff --git a/libcxx/src/experimental/time_zone.cpp b/libcxx/src/experimental/time_zone.cpp
index 764a89ab513c86..f7d82a5d4cfc30 100644
--- a/libcxx/src/experimental/time_zone.cpp
+++ b/libcxx/src/experimental/time_zone.cpp
@@ -199,7 +199,7 @@ __format(const __tz::__continuation& __continuation, const string& __letters, se
// active at the end. This should be determined separately.
return chrono::seconds{0};
else
- static_assert(sizeof(_Tp) == 0); // TODO TZDB static_assert(false); after droping clang-16 support
+ static_assert(false);
std::__libcpp_unreachable();
},
@@ -225,7 +225,7 @@ __format(const __tz::__continuation& __continuation, const string& __letters, se
else if constexpr (same_as<_Tp, __tz::__constrained_weekday>)
return __value(__year, __month);
else
- static_assert(sizeof(_Tp) == 0); // TODO TZDB static_assert(false); after droping clang-16 support
+ static_assert(false);
std::__libcpp_unreachable();
},
@@ -688,7 +688,7 @@ __get_sys_info(sys_seconds __time,
else if constexpr (same_as<_Tp, __tz::__save>)
return chrono::__get_sys_info_basic(__time, __continuation_begin, __continuation, __value.__time);
else
- static_assert(sizeof(_Tp) == 0); // TODO TZDB static_assert(false); after droping clang-16 support
+ static_assert(false);
std::__libcpp_unreachable();
},
diff --git a/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp b/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp
index 2790916edaf698..1b0b945f337005 100644
--- a/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp
+++ b/libcxx/test/libcxx/atomics/diagnose_invalid_memory_order.verify.cpp
@@ -6,11 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// This test fails with Clang <18 because diagnose_if doesn't emit all of the
-// diagnostics when -fdelayed-template-parsing is enabled, like it is in MSVC
-// mode.
-// XFAIL: msvc && clang-17
-
// REQUIRES: diagnose-if-support
// <atomic>
diff --git a/libcxx/test/libcxx/clang_tidy.gen.py b/libcxx/test/libcxx/clang_tidy.gen.py
index 06f277e901d335..f1135749febe45 100644
--- a/libcxx/test/libcxx/clang_tidy.gen.py
+++ b/libcxx/test/libcxx/clang_tidy.gen.py
@@ -26,9 +26,6 @@
// The GCC compiler flags are not always compatible with clang-tidy.
// UNSUPPORTED: gcc
-// Clang 17 has false positives.
-// UNSUPPORTED: clang-17
-
{lit_header_restrictions.get(header, '')}
{lit_header_undeprecations.get(header, '')}
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 ff951d94db0a49..6509bb58140abd 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-17, clang-18, clang-19
+// UNSUPPORTED: clang-18, clang-19, clang-20
// The Android libc++ tests are run on a non-Android host, connected to an
// Android device over adb. gdb needs special support to make this work (e.g.
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp
index a0bfb7c4a246b5..4a975f472b8287 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: msvc && clang-17
// class lazy_split_view {
// _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
diff --git a/libcxx/test/libcxx/ranges/range.adaptors/range.split/no_unique_address.compile.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.split/no_unique_address.compile.pass.cpp
index 694cf1fd0d0e4c..7950827dcc8681 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.split/no_unique_address.compile.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.split/no_unique_address.compile.pass.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: msvc && clang-17
// class split_view {
// _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
diff --git a/libcxx/test/libcxx/ranges/range.factories/range.istream.view/no_unique_address.compile.pass.cpp b/libcxx/test/libcxx/ranges/range.factories/range.istream.view/no_unique_address.compile.pass.cpp
index a77c4e4d1bcdb0..56d973d411408f 100644
--- a/libcxx/test/libcxx/ranges/range.factories/range.istream.view/no_unique_address.compile.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.factories/range.istream.view/no_unique_address.compile.pass.cpp
@@ -8,7 +8,6 @@
// UNSUPPORTED: no-localization
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// XFAIL: msvc && clang-17
// Test the libc++ extension that the value stored in `std::ranges::istream_view` has been marked
// as _LIBCPP_NO_UNIQUE_ADDRESS
@@ -21,4 +20,3 @@ struct Empty {
};
static_assert(sizeof(std::ranges::istream_view<Empty>) == sizeof(void*));
-
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
index c7a797171e0a7a..b162c2da4f337a 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp
@@ -10,7 +10,7 @@
// Older versions of clang have a bug with atomic builtins affecting double and long double.
// Fixed by 5fdd0948.
-// XFAIL: target=powerpc-ibm-{{.*}} && (clang-17 || clang-18)
+// XFAIL: target=powerpc-ibm-{{.*}} && clang-18
// https://github.com/llvm/llvm-project/issues/72893
// XFAIL: target={{x86_64-.*}} && tsan
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
index 00d43a61acc69c..8784037aa5e820 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp
@@ -10,7 +10,7 @@
// Older versions of clang have a bug with atomic builtins affecting double and long double.
// Fixed by 5fdd0948.
-// XFAIL: target=powerpc-ibm-{{.*}} && (clang-17 || clang-18)
+// XFAIL: target=powerpc-ibm-{{.*}} && clang-18
// https://github.com/llvm/llvm-project/issues/72893
// XFAIL: target={{x86_64-.*}} && tsan
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
index 5dddb7c5472e17..e0e079436075fb 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.minus_equals.pass.cpp
@@ -10,7 +10,7 @@
// Older versions of clang have a bug with atomic builtins affecting double and long double.
// Fixed by 5fdd0948.
-// XFAIL: target=powerpc-ibm-{{.*}} && (clang-17 || clang-18)
+// XFAIL: target=powerpc-ibm-{{.*}} && clang-18
// floating-point-type operator-=(floating-point-type) volatile noexcept;
// floating-point-type operator-=(floating-point-type) noexcept;
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
index cf7b494a3a800f..7e2c10106e9ab0 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.plus_equals.pass.cpp
@@ -10,7 +10,7 @@
// Older versions of clang have a bug with atomic builtins affecting double and long double.
// Fixed by 5fdd0948.
-// XFAIL: target=powerpc-ibm-{{.*}} && (clang-17 || clang-18)
+// XFAIL: target=powerpc-ibm-{{.*}} && clang-18
// floating-point-type operator+=(floating-point-type) volatile noexcept;
// floating-point-type operator+=(floating-point-type) noexcept;
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 22020b1f64881c..9124bd23148065 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
@@ -39,8 +39,8 @@
#include "../ConvertibleToIntegral.h"
#include "../CustomTestLayouts.h"
-// Clang 16 does not support argument packs as input to operator []
-#if defined(__clang_major__) && __clang_major__ < 17
+// Apple Clang does not support argument packs as input to operator []
+#ifdef TEST_COMPILER_APPLE_CLANG
template <class MDS>
constexpr auto& access(MDS mds) {
return mds[];
@@ -84,7 +84,7 @@ template <class MDS, class... Args>
constexpr void iterate(MDS mds, Args... args) {
constexpr int r = static_cast<int>(MDS::extents_type::rank()) - 1 - static_cast<int>(sizeof...(Args));
if constexpr (-1 == r) {
-#if defined(__clang_major__) && __clang_major__ < 17
+#ifdef TEST_COMPILER_APPLE_CLANG
int* ptr1 = &access(mds, args...);
#else
int* ptr1 = &mds[args...];
diff --git a/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
index c02f42400b6e1e..988ecbc11af363 100644
--- a/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.cons/array.pass.cpp
@@ -93,7 +93,9 @@ constexpr bool testSpan()
assert(s3.data() == val && s3.size() == 2);
assert(s4.data() == val && s4.size() == 2);
- std::span<const int> s5 = {{1,2}};
+ TEST_DIAGNOSTIC_PUSH
+ TEST_CLANG_DIAGNOSTIC_IGNORED("-Wdangling")
+ std::span<const int> s5 = {{1, 2}};
#if TEST_STD_VER >= 26
std::span<const int, 2> s6({1, 2});
#else
@@ -101,6 +103,7 @@ constexpr bool testSpan()
#endif
assert(s5.size() == 2); // and it dangles
assert(s6.size() == 2); // and it dangles
+ TEST_DIAGNOSTIC_POP
return true;
}
diff --git a/libcxx/test/std/experimental/simd/simd.class/simd_copy.pass.cpp b/libcxx/test/std/experimental/simd/simd.class/simd_copy.pass.cpp
index 7d91ca0eada1d3..6929831eca3612 100644
--- a/libcxx/test/std/experimental/simd/simd.class/simd_copy.pass.cpp
+++ b/libcxx/test/std/experimental/simd/simd.class/simd_copy.pass.cpp
@@ -10,7 +10,7 @@
// Older versions of clang may encounter a backend error (see 0295c2ad):
// Pass-by-value arguments with alignment greater than register width are not supported.
-// XFAIL: target=powerpc{{.*}}-ibm-{{.*}} && (clang-17 || clang-18)
+// XFAIL: target=powerpc{{.*}}-ibm-{{.*}} && clang-18
// <experimental/simd>
//
diff --git a/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp b/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp
index 17ecfd3b50d255..eb88d90ca18bd4 100644
--- a/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp
+++ b/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp
@@ -10,7 +10,7 @@
// Older versions of clang may encounter a backend error (see 0295c2ad):
// Pass-by-value arguments with alignment greater than register width are not supported.
-// XFAIL: target=powerpc{{.*}}-ibm-{{.*}} && (clang-17 || clang-18)
+// XFAIL: target=powerpc{{.*}}-ibm-{{.*}} && clang-18
// This test crashes AppleClang 15 but not later versions.
// UNSUPPORTED: apple-clang-15
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 f0ad2c0e67df32..1d763d6caba6a5 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,6 @@
// UNSUPPORTED: c++03, c++11
// These compiler versions and platforms don't enable sized deallocation by default.
-// ADDITIONAL_COMPILE_FLAGS(clang-17): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(clang-18): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple-clang-15): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple-clang-16): -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 fd52df451afc81..462037e53374bf 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,6 @@
// UNSUPPORTED: c++03, c++11
// These compiler versions and platforms don't enable sized deallocation by default.
-// ADDITIONAL_COMPILE_FLAGS(clang-17): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(clang-18): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple-clang-15): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple...
[truncated]
|
No description provided.