Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -1213,14 +1213,6 @@ typedef __char32_t char32_t;
# define _LIBCPP_DIAGNOSE_NULLPTR
# endif

// TODO(LLVM 22): Remove this macro once LLVM19 support ends. __cpp_explicit_this_parameter has been set in LLVM20.
// Clang-18 has support for deducing this, but it does not set the FTM.
# if defined(__cpp_explicit_this_parameter) || (defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 1800)
# define _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER 1
# else
# define _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER 0
# endif

#endif // __cplusplus

#endif // _LIBCPP___CONFIG
12 changes: 6 additions & 6 deletions libcxx/include/__format/format_arg.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ _LIBCPP_HIDE_FROM_ABI decltype(auto) __visit_format_arg(_Visitor&& __vis, basic_
__libcpp_unreachable();
}

# if _LIBCPP_STD_VER >= 26 && _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER
# if _LIBCPP_STD_VER >= 26

template <class _Rp, class _Visitor, class _Context>
_LIBCPP_HIDE_FROM_ABI _Rp __visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
Expand Down Expand Up @@ -200,7 +200,7 @@ _LIBCPP_HIDE_FROM_ABI _Rp __visit_format_arg(_Visitor&& __vis, basic_format_arg<
__libcpp_unreachable();
}

# endif // _LIBCPP_STD_VER >= 26 && _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER
# endif // _LIBCPP_STD_VER >= 26

/// Contains the values used in basic_format_arg.
///
Expand Down Expand Up @@ -285,7 +285,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS basic_format_arg {

_LIBCPP_HIDE_FROM_ABI explicit operator bool() const noexcept { return __type_ != __format::__arg_t::__none; }

# if _LIBCPP_STD_VER >= 26 && _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER
# if _LIBCPP_STD_VER >= 26

// This function is user facing, so it must wrap the non-standard types of
// the "variant" in a handle to stay conforming. See __arg_t for more details.
Expand Down Expand Up @@ -329,7 +329,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS basic_format_arg {
}
}

# endif // _LIBCPP_STD_VER >= 26 && _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER
# endif // _LIBCPP_STD_VER >= 26

private:
using char_type = typename _Context::char_type;
Expand Down Expand Up @@ -371,7 +371,7 @@ class _LIBCPP_TEMPLATE_VIS basic_format_arg<_Context>::handle {
// This function is user facing, so it must wrap the non-standard types of
// the "variant" in a handle to stay conforming. See __arg_t for more details.
template <class _Visitor, class _Context>
# if _LIBCPP_STD_VER >= 26 && _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER
# if _LIBCPP_STD_VER >= 26
_LIBCPP_DEPRECATED_IN_CXX26
# endif
_LIBCPP_HIDE_FROM_ABI decltype(auto)
Expand All @@ -387,7 +387,7 @@ _LIBCPP_DEPRECATED_IN_CXX26
typename __basic_format_arg_value<_Context>::__handle __h{__arg.__value_.__u128_};
return std::invoke(std::forward<_Visitor>(__vis), typename basic_format_arg<_Context>::handle{__h});
}
# endif // _LIBCPP_STD_VER >= 26 && _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER
# endif // _LIBCPP_STD_VER >= 26
default:
return std::__visit_format_arg(std::forward<_Visitor>(__vis), __arg);
}
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/format_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ class _LIBCPP_TEMPLATE_VIS basic_format_context<typename __format::__retarget_bu
__format::__determine_arg_t<basic_format_context, decltype(__arg)>(),
__basic_format_arg_value<basic_format_context>(__arg)};
};
# if _LIBCPP_STD_VER >= 26 && _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER
# if _LIBCPP_STD_VER >= 26
return static_cast<_Context*>(__c)->arg(__id).visit(std::move(__visitor));
# else
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
return std::visit_format_arg(std::move(__visitor), static_cast<_Context*>(__c)->arg(__id));
_LIBCPP_SUPPRESS_DEPRECATED_POP
# endif // _LIBCPP_STD_VER >= 26 && _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER
# endif // _LIBCPP_STD_VER >= 26
}) {
}

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/variant
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ public:
__impl_.__swap(__that.__impl_);
}

# if _LIBCPP_STD_VER >= 26 && _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER
# if _LIBCPP_STD_VER >= 26
// Helper class to implement [variant.visit]/10
// Constraints: The call to visit does not use an explicit template-argument-list
// that begins with a type template-argument.
Expand All @@ -1319,7 +1319,7 @@ public:
_LIBCPP_HIDE_FROM_ABI constexpr _Rp visit(this _Self&& __self, _Visitor&& __visitor) {
return std::visit<_Rp>(std::forward<_Visitor>(__visitor), std::__forward_as<_Self, variant>(__self));
}
# endif
# endif // _LIBCPP_STD_VER >= 26

private:
__variant_detail::__impl<_Types...> __impl_;
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/libcxx/fuzzing/random.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// This test fails because Clang no longer enables -fdelayed-template-parsing
// by default on Windows with C++20 (#69431).
// XFAIL: msvc && (clang-18 || clang-19 || clang-20 || clang-21)
// XFAIL: msvc && (clang-19 || clang-20 || clang-21)

// UNSUPPORTED: c++03, c++11

Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// UNSUPPORTED: c++03

// TODO: Investigate these failures which break the CI.
// UNSUPPORTED: clang-18, clang-19, clang-20, clang-21
// UNSUPPORTED: clang-19, clang-20, clang-21

// 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.
Expand Down
2 changes: 0 additions & 2 deletions libcxx/test/libcxx/memory/shared_ptr_array.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17

// 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you'll need ADDITIONAL_COMPILE_FLAGS(apple-clang-17): -fsized-deallocation since AppleClang still doesn't enable it by default.

// ADDITIONAL_COMPILE_FLAGS(target=x86_64-w64-windows-gnu): -fsized-deallocation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// XFAIL: !has-64-bit-atomics

// Older versions of clang have a bug with atomic builtins affecting double and long double.
// Fixed by 5fdd0948.
// XFAIL: target=powerpc-ibm-{{.*}} && clang-18

// https://github.com/llvm/llvm-project/issues/72893
// XFAIL: target={{x86_64-.*}} && tsan

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// XFAIL: !has-64-bit-atomics

// Older versions of clang have a bug with atomic builtins affecting double and long double.
// Fixed by 5fdd0948.
// XFAIL: target=powerpc-ibm-{{.*}} && clang-18

// https://github.com/llvm/llvm-project/issues/72893
// XFAIL: target={{x86_64-.*}} && tsan

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// XFAIL: !has-64-bit-atomics

// Older versions of clang have a bug with atomic builtins affecting double and long double.
// Fixed by 5fdd0948.
// XFAIL: target=powerpc-ibm-{{.*}} && clang-18

// floating-point-type operator-=(floating-point-type) volatile noexcept;
// floating-point-type operator-=(floating-point-type) noexcept;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// XFAIL: !has-64-bit-atomics

// Older versions of clang have a bug with atomic builtins affecting double and long double.
// Fixed by 5fdd0948.
// XFAIL: target=powerpc-ibm-{{.*}} && clang-18

// floating-point-type operator+=(floating-point-type) volatile noexcept;
// floating-point-type operator+=(floating-point-type) noexcept;

Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// This test fails because Clang no longer enables -fdelayed-template-parsing
// by default on Windows with C++20 (#69431).
// XFAIL: msvc && (clang-18 || clang-19 || clang-20 || clang-21)
// XFAIL: msvc && (clang-19 || clang-20 || clang-21)

// <math.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

// UNSUPPORTED: c++03, c++11, c++14

// 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-18

// <experimental/simd>
//
// [simd.class]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

// UNSUPPORTED: c++03, c++11, c++14

// 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-18

// This test crashes AppleClang 15 but not later versions.
// UNSUPPORTED: apple-clang-15

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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-18): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple-clang-15): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple-clang-16): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple-clang-17): -fsized-deallocation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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-18): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple-clang-15): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple-clang-16): -fsized-deallocation
// ADDITIONAL_COMPILE_FLAGS(apple-clang-17): -fsized-deallocation
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/std/numerics/c.math/cmath.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// This test fails because Clang no longer enables -fdelayed-template-parsing
// by default on Windows with C++20 (#69431).
// XFAIL: msvc && (clang-18 || clang-19 || clang-20 || clang-21)
// XFAIL: msvc && (clang-19 || clang-20 || clang-21)

// <cmath>

Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/std/numerics/c.math/signbit.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// UNSUPPORTED: windows

// These compilers don't support constexpr `__builtin_signbit` yet.
// UNSUPPORTED: clang-18, clang-19, apple-clang-15, apple-clang-16, apple-clang-17
// UNSUPPORTED: clang-19, apple-clang-15, apple-clang-16, apple-clang-17

// GCC warns about signbit comparing `bool_v < 0`, which we're testing
// ADDITIONAL_COMPILE_FLAGS(gcc): -Wno-bool-compare
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "make_string.h"
#include "min_allocator.h"

#if TEST_STD_VER >= 26 && defined(TEST_HAS_EXPLICIT_THIS_PARAMETER)
#if TEST_STD_VER >= 26
TEST_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void test(From value) {
else
assert(false);
};
#if TEST_STD_VER >= 26 && defined(TEST_HAS_EXPLICIT_THIS_PARAMETER)
#if TEST_STD_VER >= 26
format_args.get(0).visit(visitor);
#else
std::visit_format_arg(visitor, format_args.get(0));
Expand All @@ -47,7 +47,7 @@ void test_handle(T value) {
std::basic_format_args<Context> format_args{store};

auto visitor = [](auto a) { assert((std::is_same_v<decltype(a), typename std::basic_format_arg<Context>::handle>)); };
#if TEST_STD_VER >= 26 && defined(TEST_HAS_EXPLICIT_THIS_PARAMETER)
#if TEST_STD_VER >= 26
format_args.get(0).visit(visitor);
#else
std::visit_format_arg(visitor, format_args.get(0));
Expand All @@ -73,7 +73,7 @@ void test_string_view(From value) {
else
assert(false);
};
#if TEST_STD_VER >= 26 && defined(TEST_HAS_EXPLICIT_THIS_PARAMETER)
#if TEST_STD_VER >= 26
format_args.get(0).visit(visitor);
#else
std::visit_format_arg(visitor, format_args.get(0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23

// These compilers don't support __builtin_is_virtual_base_of yet.
// UNSUPPORTED: clang-18, clang-19, gcc-14, apple-clang-16, apple-clang-17
// UNSUPPORTED: clang-19, gcc-14, apple-clang-16, apple-clang-17

// <type_traits>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20

// These compilers don't support __builtin_is_implicit_lifetime yet.
// UNSUPPORTED: clang-18, clang-19, gcc-14, apple-clang-15, apple-clang-16, apple-clang-17
// UNSUPPORTED: clang-19, gcc-14, apple-clang-15, apple-clang-16, apple-clang-17

// <type_traits>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20

// These compilers don't support __builtin_is_implicit_lifetime yet.
// UNSUPPORTED: clang-18, clang-19, gcc-14, apple-clang-15, apple-clang-16, apple-clang-17
// UNSUPPORTED: clang-19, gcc-14, apple-clang-15, apple-clang-16, apple-clang-17

// <type_traits>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// REQUIRES: std-at-least-c++23

// These compilers don't support std::reference_converts_from_temporary yet.
// UNSUPPORTED: android, apple-clang-15, apple-clang-16, clang-18, clang-19.1
// UNSUPPORTED: android, apple-clang-15, apple-clang-16, clang-19.1

// <type_traits>

Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/support/test_basic_format_arg.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ bool test_basic_format_arg(std::basic_format_arg<Context> arg, T expected) {
else
return false;
};
#if TEST_STD_VER >= 26 && defined(TEST_HAS_EXPLICIT_THIS_PARAMETER)
#if TEST_STD_VER >= 26
return arg.visit(std::move(visitor));
#else
return std::visit_format_arg(std::move(visitor), arg);
Expand Down
7 changes: 0 additions & 7 deletions libcxx/test/support/test_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,6 @@ inline Tp const& DoNotOptimize(Tp const& value) {
# define TEST_IF_AIX(arg_true, arg_false) arg_false
#endif

// Clang-18 has support for deducing this, but it does not set the FTM.
#ifdef _LIBCPP_USE_FROZEN_CXX03_HEADERS
// This is a C++20 featue, so we don't care whether the compiler could support it
#elif defined(_LIBCPP_VERSION) && _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER
# define TEST_HAS_EXPLICIT_THIS_PARAMETER
#endif

// Placement `operator new`/`operator new[]` are not yet constexpr in C++26
// when using MS ABI, because they are from <vcruntime_new.h>.
#if defined(__cpp_lib_constexpr_new) && __cpp_lib_constexpr_new >= 202406L
Expand Down
Loading