diff options
Diffstat (limited to 'libcxx/test')
42 files changed, 96 insertions, 419 deletions
| diff --git a/libcxx/test/libcxx-03/utilities/meta/is_referenceable.compile.pass.cpp b/libcxx/test/libcxx-03/utilities/meta/is_referenceable.compile.pass.cpp index 093bbae..f39d1a5 100644 --- a/libcxx/test/libcxx-03/utilities/meta/is_referenceable.compile.pass.cpp +++ b/libcxx/test/libcxx-03/utilities/meta/is_referenceable.compile.pass.cpp @@ -7,7 +7,7 @@  //===----------------------------------------------------------------------===//  // -// __is_referenceable_v<Tp> +// __libcpp_is_referenceable<Tp>  //  // [defns.referenceable] defines "a referenceable type" as:  // An object type, a function type that does not have cv-qualifiers diff --git a/libcxx/test/libcxx/input.output/iostreams.base/ios.base/ios.base.cons/dtor.uninitialized.pass.cpp b/libcxx/test/libcxx/input.output/iostreams.base/ios.base/ios.base.cons/dtor.uninitialized.pass.cpp index f17c148..16d66e3 100644 --- a/libcxx/test/libcxx/input.output/iostreams.base/ios.base/ios.base.cons/dtor.uninitialized.pass.cpp +++ b/libcxx/test/libcxx/input.output/iostreams.base/ios.base/ios.base.cons/dtor.uninitialized.pass.cpp @@ -6,14 +6,12 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // UNSUPPORTED: no-exceptions  // The fix for issue 57964 requires an updated dylib due to explicit  // instantiations. That means Apple backdeployment targets remain broken. -// XFAIL: using-built-library-before-llvm-19 +// TODO: Remove && !darwin once availability markup for LLVM 19 on macOS has been added +// XFAIL: using-built-library-before-llvm-19 && !darwin  // <ios> diff --git a/libcxx/test/libcxx/numerics/c.math/constexpr-cxx23-clang.pass.cpp b/libcxx/test/libcxx/numerics/c.math/constexpr-cxx23-clang.pass.cpp index 3f17f21e..20887b8 100644 --- a/libcxx/test/libcxx/numerics/c.math/constexpr-cxx23-clang.pass.cpp +++ b/libcxx/test/libcxx/numerics/c.math/constexpr-cxx23-clang.pass.cpp @@ -220,16 +220,9 @@ int main(int, char**) {    ASSERT_CONSTEXPR_CXX23(std::isnormal(-1.0) == 1);    ASSERT_CONSTEXPR_CXX23(std::isnormal(-1.0L) == 1); -// TODO(LLVM 22): Remove `__has_constexpr_builtin` conditional once support for Clang 19 is dropped. -#if !__has_constexpr_builtin(__builtin_signbit) -  ASSERT_NOT_CONSTEXPR_CXX23(std::signbit(-1.0f) == 1); -  ASSERT_NOT_CONSTEXPR_CXX23(std::signbit(-1.0) == 1); -  ASSERT_NOT_CONSTEXPR_CXX23(std::signbit(-1.0L) == 1); -#else    ASSERT_CONSTEXPR_CXX23(std::signbit(-1.0f) == 1);    ASSERT_CONSTEXPR_CXX23(std::signbit(-1.0) == 1);    ASSERT_CONSTEXPR_CXX23(std::signbit(-1.0L) == 1); -#endif    ASSERT_NOT_CONSTEXPR_CXX23(std::isgreater(-1.0f, 0.0f) == 0);    ASSERT_NOT_CONSTEXPR_CXX23(std::isgreater(-1.0, 0.0) == 0); diff --git a/libcxx/test/libcxx/utilities/expected/expected.expected/transform_error.mandates.verify.cpp b/libcxx/test/libcxx/utilities/expected/expected.expected/transform_error.mandates.verify.cpp index 09ebd00..3e9bdd9 100644 --- a/libcxx/test/libcxx/utilities/expected/expected.expected/transform_error.mandates.verify.cpp +++ b/libcxx/test/libcxx/utilities/expected/expected.expected/transform_error.mandates.verify.cpp @@ -8,15 +8,6 @@  // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 -// With clang-cl, some warnings have a 'which is a Microsoft extension' suffix -// which break the tests. But #102851 will turn it into an error, making the test pass. -// However, upstream libcxx buildbots do not build clang from source while testing, so -// this tests still expected to fail on these bots. -// -// TODO(LLVM 22): Remove '0-1' from 'expected-error-re@*:* 0-1 {{union member {{.*}} has reference type {{.*}}}}' -// and remove 'expected-warning-re@*:* 0-1 {{union member {{.*}} has reference type {{.*}}, which is a Microsoft extension}}' -// once LLVM 22 releases. See https://llvm.org/PR104885. -  // Test the mandates  // template<class F> constexpr auto transform_error(F&& f) &; @@ -55,41 +46,39 @@ void test() {    {      std::expected<int, int> e;      e.transform_error(return_unexpected<int&>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-1 {{no matching constructor for initialization of{{.*}}}}      // expected-error-re@*:* {{static assertion failed {{.*}}[expected.object.general] A program that instantiates the definition of template expected<T, E> for {{.*}} is ill-formed.}} -    // expected-error-re@*:* 0-1 {{union member {{.*}} has reference type {{.*}}}} +    // expected-error-re@*:* {{union member {{.*}} has reference type {{.*}}}}      e.transform_error(return_no_object<int&>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-1 {{no matching constructor for initialization of{{.*}}}} +    // expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}      // expected-error-re@*:* {{static assertion failed {{.*}}[expected.object.general] A program that instantiates the definition of template expected<T, E> for {{.*}} is ill-formed.}} -    // expected-warning-re@*:* 0-1 {{union member {{.*}} has reference type {{.*}}, which is a Microsoft extension}}    }    // Test const& overload    {      const std::expected<int, int> e;      e.transform_error(return_unexpected<const int &>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-2 {{no matching constructor for initialization of{{.*}}}} +    // expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}      e.transform_error(return_no_object<const int &>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-2 {{no matching constructor for initialization of{{.*}}}} +    // expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}    }    // Test && overload    {      std::expected<int, int> e;      std::move(e).transform_error(return_unexpected<int&&>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-2 {{no matching constructor for initialization of{{.*}}}} +    // expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}      std::move(e).transform_error(return_no_object<int&&>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-2 {{no matching constructor for initialization of{{.*}}}} +    // expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}    }    // Test const&& overload    {      const std::expected<int, int> e;      std::move(e).transform_error(return_unexpected<const int&&>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-2 {{no matching constructor for initialization of{{.*}}}} +    // expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}      std::move(e).transform_error(return_no_object<const int&&>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-2 {{no matching constructor for initialization of{{.*}}}} +    // expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}    }  }  // clang-format on diff --git a/libcxx/test/libcxx/utilities/expected/expected.void/transform_error.mandates.verify.cpp b/libcxx/test/libcxx/utilities/expected/expected.void/transform_error.mandates.verify.cpp index 9fd7452..c5acc27 100644 --- a/libcxx/test/libcxx/utilities/expected/expected.void/transform_error.mandates.verify.cpp +++ b/libcxx/test/libcxx/utilities/expected/expected.void/transform_error.mandates.verify.cpp @@ -8,16 +8,6 @@  // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 -// With clang-cl, some warnings have a 'which is a Microsoft extension' suffix -// which break the tests. But #102851 will turn it into an error, making the test pass. -// However, upstream libcxx buildbots do not build clang from source while testing, so -// this tests still expected to fail on these bots. -// -// TODO(LLVM 22): Remove '0-1' from 'expected-error-re@*:* 0-1 {{union member {{.*}} has reference type {{.*}}}}' -// and remove 'expected-warning-re@*:* 0-1 {{union member {{.*}} has reference type {{.*}}, which is a Microsoft extension}}' -// and remove 'expected-error-re@*:* 0-1 {{call to deleted constructor of {{.*}}}}' -// once LLVM 22 releases. See See https://llvm.org/PR104885. -  // Test the mandates  // template<class F> constexpr auto transform_error(F&& f) &; @@ -56,43 +46,36 @@ void test() {    {      std::expected<void, int> e;      e.transform_error(return_unexpected<int&>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-1 {{no matching constructor for initialization of{{.*}}}} +    // expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}      // expected-error-re@*:* {{static assertion failed {{.*}}A program that instantiates expected<T, E> with a E that is not a valid argument for unexpected<E> is ill-formed}} -    // expected-error-re@*:* 0-1 {{call to deleted constructor of {{.*}}}} -    // expected-error-re@*:* 0-1 {{union member {{.*}} has reference type {{.*}}}} +    // expected-error-re@*:* {{union member {{.*}} has reference type {{.*}}}}      e.transform_error(return_no_object<int&>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-1 {{no matching constructor for initialization of{{.*}}}} +    // expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}      // expected-error-re@*:* {{static assertion failed {{.*}}A program that instantiates expected<T, E> with a E that is not a valid argument for unexpected<E> is ill-formed}} -    // expected-warning-re@*:* 0-1 {{union member {{.*}} has reference type {{.*}}, which is a Microsoft extension}}    }    // Test const& overload    {      const std::expected<void, int> e;      e.transform_error(return_unexpected<const int &>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-1 {{no matching constructor for initialization of{{.*}}}} +    // expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}      e.transform_error(return_no_object<const int &>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-1 {{no matching constructor for initialization of{{.*}}}} -    // expected-error-re@*:* 0-1 {{call to deleted constructor of {{.*}}}} +    // expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}    }    // Test && overload    {      std::expected<void, int> e;      std::move(e).transform_error(return_unexpected<int&&>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-1 {{no matching constructor for initialization of{{.*}}}}      std::move(e).transform_error(return_no_object<int&&>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-1 {{no matching constructor for initialization of{{.*}}}}    }    // Test const&& overload    {      const std::expected<void, int> e;      std::move(e).transform_error(return_unexpected<const int&&>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-1 {{no matching constructor for initialization of{{.*}}}}      std::move(e).transform_error(return_no_object<const int&&>); // expected-error-re@*:* {{static assertion failed {{.*}}The result of {{.*}} must be a valid template argument for unexpected}} -    // expected-error-re@*:* 0-1 {{no matching constructor for initialization of{{.*}}}}    }  }  // clang-format on diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/setbuf.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/setbuf.pass.cpp index 9d14abc..00aa97a 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/setbuf.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/setbuf.pass.cpp @@ -6,16 +6,14 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // <fstream>  // basic_streambuf<charT, traits>* setbuf(char_type* s, streamsize n) override;  // This test requires the fix to https://llvm.org/PR60509 in the dylib,  // which landed in 5afb937d8a30445642ccaf33866ee4cdd0713222. -// XFAIL: using-built-library-before-llvm-19 +// TODO: Remove && !darwin once availability markup for LLVM 19 on macOS has been added +// XFAIL: using-built-library-before-llvm-19 && !darwin  #include <fstream>  #include <cstddef> diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp index 3b68595..b04d2c0 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/sync.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // <istream>  // int sync(); @@ -16,7 +13,8 @@  // The fix for bug 51497 and bug 51499 require and updated dylib due to  // explicit instantiations. That means Apple backdeployment targets remain  // broken. -// XFAIL: using-built-library-before-llvm-19 +// TODO: Remove && !darwin once availability markup for LLVM 19 on macOS has been added +// XFAIL: using-built-library-before-llvm-19 && !darwin  #include <istream>  #include <cassert> diff --git a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp index 4905ed4..8ae6bc2 100644 --- a/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // Bionic has minimal locale support, investigate this later.  // XFAIL: LIBCXX-ANDROID-FIXME @@ -56,14 +53,7 @@ int main(int, char**)              ASSERT_COMPARE(std::string, "AAA", "BBB", -1);              ASSERT_COMPARE(std::string, "bbb", "aaa", 1);              ASSERT_COMPARE(std::string, "ccc", "ccc", 0); - -#if defined(__APPLE__) -            // Apple's default collation is case-sensitive -            ASSERT_COMPARE(std::string, "aaaaaaA", "BaaaaaA", 1); -#else -            // Glibc, Windows, and FreeBSD's default collation is case-insensitive              ASSERT_COMPARE(std::string, "aaaaaaA", "BaaaaaA", -1); -#endif          }  #ifndef TEST_HAS_NO_WIDE_CHARACTERS          { @@ -73,13 +63,7 @@ int main(int, char**)              ASSERT_COMPARE(std::wstring, L"AAA", L"BBB", -1);              ASSERT_COMPARE(std::wstring, L"bbb", L"aaa", 1);              ASSERT_COMPARE(std::wstring, L"ccc", L"ccc", 0); -#if defined(__APPLE__) -            // Apple's default collation is case-sensitive -            ASSERT_COMPARE(std::wstring, L"aaaaaaA", L"BaaaaaA", 1); -#else -            // Glibc, Windows, and FreeBSD's default collation is case-insensitive              ASSERT_COMPARE(std::wstring, L"aaaaaaA", L"BaaaaaA", -1); -#endif          }  #endif      } diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp index ea6b079..c9ed59f 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp @@ -6,11 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang - -// XFAIL: darwin -  // NetBSD does not support LC_MONETARY at the moment  // XFAIL: netbsd diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp index f98758d..371cf0e 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // NetBSD does not support LC_MONETARY at the moment  // XFAIL: netbsd diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp index 6980b7a..c86df7e 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // NetBSD does not support LC_MONETARY at the moment  // XFAIL: netbsd @@ -158,7 +155,7 @@ int main(int, char**)              std::noshowbase(ios);          }          {   // negative one, showbase -#ifdef _AIX +#if defined(_AIX) || defined(__APPLE__)            std::string v = "-" + currency_symbol + "0.01";  #else            std::string v = currency_symbol + "-0.01"; @@ -172,7 +169,7 @@ int main(int, char**)            assert(ex == -1);          }          {   // negative one, showbase -#ifdef _AIX +#if defined(_AIX) || defined(__APPLE__)            std::string v = "-" + currency_symbol + "0.01";  #else            std::string v = currency_symbol + "-0.01"; @@ -212,7 +209,7 @@ int main(int, char**)              std::noshowbase(ios);          }          {   // negative, showbase -#ifdef _AIX +#if defined(_AIX) || defined(__APPLE__)            std::string v = "-" + currency_symbol + "1,234,567.89";  #else            std::string v = currency_symbol + "-1,234,567.89"; @@ -333,7 +330,7 @@ int main(int, char**)              std::noshowbase(ios);          }          {   // negative one, showbase -#if defined(TEST_HAS_GLIBC) || defined(_AIX) +#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)            std::string v = "-" + currency_name + "0.01";  #else              std::string v = currency_name + "-0.01"; @@ -348,7 +345,7 @@ int main(int, char**)              assert(ex == -1);          }          {   // negative one, showbase -#if defined(TEST_HAS_GLIBC) || defined(_AIX) +#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)            std::string v = "-" + currency_name + "0.01";  #else              std::string v = currency_name + "-0.01"; @@ -389,7 +386,7 @@ int main(int, char**)              std::noshowbase(ios);          }          {   // negative, showbase -#if defined(TEST_HAS_GLIBC) || defined(_AIX) +#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)            std::string v = "-" + currency_name + "1,234,567.89";  #else              std::string v = currency_name + "-1,234,567.89"; @@ -518,7 +515,7 @@ int main(int, char**)              std::noshowbase(ios);          }          {   // negative one, showbase -#  ifdef _AIX +#  if defined(_AIX) || defined(__APPLE__)            std::wstring v = L"-" + w_currency_symbol + L"0.01";  #  else            std::wstring v = w_currency_symbol + L"-0.01"; @@ -532,7 +529,7 @@ int main(int, char**)            assert(ex == -1);          }          {   // negative one, showbase -#  ifdef _AIX +#  if defined(_AIX) || defined(__APPLE__)            std::wstring v = L"-" + w_currency_symbol + L"0.01";  #  else            std::wstring v = w_currency_symbol + L"-0.01"; @@ -572,7 +569,7 @@ int main(int, char**)              std::noshowbase(ios);          }          {   // negative, showbase -#  ifdef _AIX +#  if defined(_AIX) || defined(__APPLE__)            std::wstring v = L"-" + w_currency_symbol + L"1,234,567.89";  #  else            std::wstring v = w_currency_symbol + L"-1,234,567.89"; @@ -693,7 +690,7 @@ int main(int, char**)              std::noshowbase(ios);          }          {   // negative one, showbase -#  if defined(TEST_HAS_GLIBC) || defined(_AIX) +#  if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)            std::wstring v = L"-" + w_currency_name + L"0.01";  #  else            std::wstring v = w_currency_name + L"-0.01"; @@ -707,7 +704,7 @@ int main(int, char**)            assert(ex == -1);          }          {   // negative one, showbase -#  if defined(TEST_HAS_GLIBC) || defined(_AIX) +#  if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)            std::wstring v = L"-" + w_currency_name + L"0.01";  #  else            std::wstring v = w_currency_name + L"-0.01"; @@ -747,7 +744,7 @@ int main(int, char**)              std::noshowbase(ios);          }          {   // negative, showbase -#  if defined(TEST_HAS_GLIBC) || defined(_AIX) +#  if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)            std::wstring v = L"-" + w_currency_name + L"1,234,567.89";  #  else            std::wstring v = w_currency_name + L"-1,234,567.89"; diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp index 1474599..f9d7998 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp @@ -6,11 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang - -// XFAIL: darwin -  // NetBSD does not support LC_MONETARY at the moment  // XFAIL: netbsd diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp index 0455e59..be1e397 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // NetBSD does not support LC_MONETARY at the moment  // XFAIL: netbsd diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp index 68640fa..25046a8 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // NetBSD does not support LC_MONETARY at the moment  // XFAIL: netbsd @@ -122,7 +119,7 @@ int main(int, char**)          char str[100];          cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, '*', v);          std::string ex(str, base(iter)); -#ifdef _AIX +#if defined(_AIX) || defined(__APPLE__)          assert(ex == "-" + currency_symbol + "0.01");  #else          assert(ex == currency_symbol + "-0.01"); @@ -142,7 +139,7 @@ int main(int, char**)          char str[100];          cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, '*', v);          std::string ex(str, base(iter)); -#ifdef _AIX +#if defined(_AIX) || defined(__APPLE__)          assert(ex == "-" + currency_symbol + "1,234,567.89");  #else          assert(ex == currency_symbol + "-1,234,567.89"); @@ -156,7 +153,7 @@ int main(int, char**)          char str[100];          cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, ' ', v);          std::string ex(str, base(iter)); -#ifdef _AIX +#if defined(_AIX) || defined(__APPLE__)          assert(ex == "-" + currency_symbol + "1,234,567.89" + currency_symbol_padding);  #else          assert(ex == currency_symbol + "-1,234,567.89" + currency_symbol_padding); @@ -171,7 +168,7 @@ int main(int, char**)          char str[100];          cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, ' ', v);          std::string ex(str, base(iter)); -#ifdef _AIX +#if defined(_AIX) || defined(__APPLE__)          assert(ex == "-" + currency_symbol + currency_symbol_padding + "1,234,567.89");  #else          assert(ex == currency_symbol + "-" + currency_symbol_padding + "1,234,567.89"); @@ -186,7 +183,7 @@ int main(int, char**)          char str[100];          cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), false, ios, ' ', v);          std::string ex(str, base(iter)); -#ifdef _AIX +#if defined(_AIX) || defined(__APPLE__)          assert(ex == currency_symbol_padding + "-" + currency_symbol + "1,234,567.89");  #else          assert(ex == currency_symbol_padding + currency_symbol + "-1,234,567.89"); @@ -239,7 +236,7 @@ int main(int, char**)          char str[100];          cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, '*', v);          std::string ex(str, base(iter)); -#if defined(TEST_HAS_GLIBC) || defined(_AIX) +#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)          assert(ex == "-" + currency_name + "0.01");  #else          assert(ex == currency_name + "-0.01"); @@ -259,7 +256,7 @@ int main(int, char**)          char str[100];          cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, '*', v);          std::string ex(str, base(iter)); -#if defined(TEST_HAS_GLIBC) || defined(_AIX) +#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)          assert(ex == "-" + currency_name + "1,234,567.89");  #else          assert(ex == currency_name + "-1,234,567.89"); @@ -273,7 +270,7 @@ int main(int, char**)          char str[100];          cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, ' ', v);          std::string ex(str, base(iter)); -#if defined(TEST_HAS_GLIBC) || defined(_AIX) +#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)          assert(ex == "-" + currency_name + "1,234,567.89" + currency_name_padding);  #else          assert(ex == currency_name + "-1,234,567.89" + currency_name_padding); @@ -288,7 +285,7 @@ int main(int, char**)          char str[100];          cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, ' ', v);          std::string ex(str, base(iter)); -#if defined(TEST_HAS_GLIBC) || defined(_AIX) +#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)          assert(ex == "-" + currency_name + currency_name_padding + "1,234,567.89");  #else          assert(ex == currency_name + "-" + currency_name_padding + "1,234,567.89"); @@ -303,7 +300,7 @@ int main(int, char**)          char str[100];          cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), true, ios, ' ', v);          std::string ex(str, base(iter)); -#if defined(TEST_HAS_GLIBC) || defined(_AIX) +#if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)          assert(ex == currency_name_padding + "-" + currency_name + "1,234,567.89");  #else          assert(ex == currency_name_padding + currency_name + "-1,234,567.89"); @@ -366,7 +363,7 @@ int main(int, char**)          wchar_t str[100];          cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, '*', v);          std::wstring ex(str, base(iter)); -#  ifdef _AIX +#  if defined(_AIX) || defined(__APPLE__)          assert(ex == L"-" + currency_symbol + L"0.01");  #  else          assert(ex == currency_symbol + L"-0.01"); @@ -386,7 +383,7 @@ int main(int, char**)          wchar_t str[100];          cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, '*', v);          std::wstring ex(str, base(iter)); -#  ifdef _AIX +#  if defined(_AIX) || defined(__APPLE__)          assert(ex == L"-" + currency_symbol + L"1,234,567.89");  #  else          assert(ex == currency_symbol + L"-1,234,567.89"); @@ -400,7 +397,7 @@ int main(int, char**)          wchar_t str[100];          cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, ' ', v);          std::wstring ex(str, base(iter)); -#  ifdef _AIX +#  if defined(_AIX) || defined(__APPLE__)          assert(ex == L"-" + currency_symbol + L"1,234,567.89      ");  #  else          assert(ex == currency_symbol + L"-1,234,567.89      "); @@ -415,7 +412,7 @@ int main(int, char**)          wchar_t str[100];          cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, ' ', v);          std::wstring ex(str, base(iter)); -#  ifdef _AIX +#  if defined(_AIX) || defined(__APPLE__)          assert(ex == L"-" + currency_symbol + L"      1,234,567.89");  #  else          assert(ex == currency_symbol + L"-      1,234,567.89"); @@ -430,7 +427,7 @@ int main(int, char**)          wchar_t str[100];          cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), false, ios, ' ', v);          std::wstring ex(str, base(iter)); -#  ifdef _AIX +#  if defined(_AIX) || defined(__APPLE__)          assert(ex == L"      -" + currency_symbol + L"1,234,567.89");  #  else          assert(ex == L"      " + currency_symbol + L"-1,234,567.89"); @@ -483,7 +480,7 @@ int main(int, char**)          wchar_t str[100];          cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, '*', v);          std::wstring ex(str, base(iter)); -#  if defined(TEST_HAS_GLIBC) || defined(_AIX) +#  if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)          assert(ex == L"-" + currency_name + L"0.01");  #else          assert(ex == currency_name + L"-0.01"); @@ -503,7 +500,7 @@ int main(int, char**)          wchar_t str[100];          cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, '*', v);          std::wstring ex(str, base(iter)); -#  if defined(TEST_HAS_GLIBC) || defined(_AIX) +#  if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)          assert(ex == L"-" + currency_name + L"1,234,567.89");  #else          assert(ex == currency_name + L"-1,234,567.89"); @@ -517,7 +514,7 @@ int main(int, char**)          wchar_t str[100];          cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, ' ', v);          std::wstring ex(str, base(iter)); -#  if defined(TEST_HAS_GLIBC) || defined(_AIX) +#  if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)          assert(ex == L"-" + currency_name + L"1,234,567.89" + currency_name_padding);  #else          assert(ex == currency_name + L"-1,234,567.89" + currency_name_padding); @@ -532,7 +529,7 @@ int main(int, char**)          wchar_t str[100];          cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, ' ', v);          std::wstring ex(str, base(iter)); -#  if defined(TEST_HAS_GLIBC) || defined(_AIX) +#  if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)          assert(ex == L"-" + currency_name + currency_name_padding + L"1,234,567.89");  #else          assert(ex == currency_name + L"-" + currency_name_padding + L"1,234,567.89"); @@ -547,7 +544,7 @@ int main(int, char**)          wchar_t str[100];          cpp17_output_iterator<wchar_t*> iter = f.put(cpp17_output_iterator<wchar_t*>(str), true, ios, ' ', v);          std::wstring ex(str, base(iter)); -#  if defined(TEST_HAS_GLIBC) || defined(_AIX) +#  if defined(TEST_HAS_GLIBC) || defined(_AIX) || defined(__APPLE__)          assert(ex == currency_name_padding + L"-" + currency_name + L"1,234,567.89");  #else          assert(ex == currency_name_padding + currency_name + L"-1,234,567.89"); diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp index 9c1253d..e7f0f29 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // NetBSD does not support LC_MONETARY at the moment  // XFAIL: netbsd @@ -117,11 +114,7 @@ int main(int, char**)      {          Fnf f(LOCALE_fr_FR_UTF_8, 1); -#ifdef __APPLE__ -        assert(f.curr_symbol() == " Eu"); -#else          assert(f.curr_symbol() == " \u20ac"); -#endif      }      {          Fnt f(LOCALE_fr_FR_UTF_8, 1); @@ -130,11 +123,7 @@ int main(int, char**)  #ifndef TEST_HAS_NO_WIDE_CHARACTERS      {          Fwf f(LOCALE_fr_FR_UTF_8, 1); -#ifdef __APPLE__ -        assert(f.curr_symbol() == L" Eu"); -#else          assert(f.curr_symbol() == L" \u20ac"); -#endif      }      {          Fwt f(LOCALE_fr_FR_UTF_8, 1); @@ -164,7 +153,7 @@ int main(int, char**)      {          Fnf f(LOCALE_zh_CN_UTF_8, 1); -#ifdef _WIN32 +#if defined(_WIN32) || defined(__APPLE__)          assert(f.curr_symbol() == "\xC2\xA5"); // \u00A5  #else          assert(f.curr_symbol() == "\xEF\xBF\xA5"); // \uFFE5 @@ -177,7 +166,7 @@ int main(int, char**)  #ifndef TEST_HAS_NO_WIDE_CHARACTERS      {          Fwf f(LOCALE_zh_CN_UTF_8, 1); -#ifdef _WIN32 +#if defined(_WIN32) || defined(__APPLE__)          assert(f.curr_symbol() == L"\u00A5");  #else          assert(f.curr_symbol() == L"\uFFE5"); diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp index 630b273..90dc6c4 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp @@ -6,11 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang - -// XFAIL: darwin -//  // NetBSD does not support LC_MONETARY at the moment  // XFAIL: netbsd diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp index a3e3d853..e952814 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // NetBSD does not support LC_MONETARY at the moment  // XFAIL: netbsd @@ -82,14 +79,6 @@ void assert_sign_symbol_none_value(std::money_base::pattern p)      assert(p.field[3] == std::money_base::value);  } -void assert_value_none_symbol_sign(std::money_base::pattern p) -{ -    assert(p.field[0] == std::money_base::value); -    assert(p.field[1] == std::money_base::none); -    assert(p.field[2] == std::money_base::symbol); -    assert(p.field[3] == std::money_base::sign); -} -  void assert_sign_value_none_symbol(std::money_base::pattern p)  {      assert(p.field[0] == std::money_base::sign); @@ -149,39 +138,23 @@ int main(int, char**)      {          Fnf f(LOCALE_fr_FR_UTF_8, 1);          std::money_base::pattern p = f.neg_format(); -#ifdef __APPLE__ -        assert_value_none_symbol_sign(p); -#else          assert_sign_value_none_symbol(p); -#endif      }      {          Fnt f(LOCALE_fr_FR_UTF_8, 1);          std::money_base::pattern p = f.neg_format(); -#ifdef __APPLE__ -        assert_value_none_symbol_sign(p); -#else          assert_sign_value_none_symbol(p); -#endif      }  #ifndef TEST_HAS_NO_WIDE_CHARACTERS      {          Fwf f(LOCALE_fr_FR_UTF_8, 1);          std::money_base::pattern p = f.neg_format(); -#ifdef __APPLE__ -        assert_value_none_symbol_sign(p); -#else          assert_sign_value_none_symbol(p); -#endif      }      {          Fwt f(LOCALE_fr_FR_UTF_8, 1);          std::money_base::pattern p = f.neg_format(); -#ifdef __APPLE__ -        assert_value_none_symbol_sign(p); -#else          assert_sign_value_none_symbol(p); -#endif      }  #endif // TEST_HAS_NO_WIDE_CHARACTERS @@ -211,7 +184,7 @@ int main(int, char**)      {          Fnf f(LOCALE_zh_CN_UTF_8, 1);          std::money_base::pattern p = f.neg_format(); -#ifdef _AIX +#if defined(_AIX) || defined(__APPLE__)          assert_sign_symbol_none_value(p);  #else          assert_symbol_sign_none_value(p); @@ -220,7 +193,7 @@ int main(int, char**)      {          Fnt f(LOCALE_zh_CN_UTF_8, 1);          std::money_base::pattern p = f.neg_format(); -#if defined(_WIN32) || defined(__APPLE__) +#if defined(_WIN32)          assert_symbol_sign_none_value(p);  #else          assert_sign_symbol_none_value(p); @@ -230,7 +203,7 @@ int main(int, char**)      {          Fwf f(LOCALE_zh_CN_UTF_8, 1);          std::money_base::pattern p = f.neg_format(); -#ifdef _AIX +#if defined(_AIX) || defined(__APPLE__)          assert_sign_symbol_none_value(p);  #else          assert_symbol_sign_none_value(p); @@ -239,7 +212,7 @@ int main(int, char**)      {          Fwt f(LOCALE_zh_CN_UTF_8, 1);          std::money_base::pattern p = f.neg_format(); -#if defined(_WIN32) || defined(__APPLE__) +#if defined(_WIN32)          assert_symbol_sign_none_value(p);  #else          assert_sign_symbol_none_value(p); diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp index 671620a..11832a7 100644 --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp @@ -5,7 +5,7 @@  // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception  //  //===----------------------------------------------------------------------===// -// +  // NetBSD does not support LC_MONETARY at the moment  // XFAIL: netbsd @@ -79,14 +79,6 @@ void assert_sign_symbol_none_value(std::money_base::pattern p)      assert(p.field[3] == std::money_base::value);  } -void assert_value_none_symbol_sign(std::money_base::pattern p) -{ -    assert(p.field[0] == std::money_base::value); -    assert(p.field[1] == std::money_base::none); -    assert(p.field[2] == std::money_base::symbol); -    assert(p.field[3] == std::money_base::sign); -} -  void assert_sign_value_none_symbol(std::money_base::pattern p)  {      assert(p.field[0] == std::money_base::sign); diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp index 612d373..31682fea 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp @@ -6,12 +6,10 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) changed behavior of  // FP parsing. This requires 3e15c97fa3812993bdc319827a5c6d867b765ae8 in the dylib. -// XFAIL: using-built-library-before-llvm-19 +// TODO: Remove && !darwin once availability markup for LLVM 19 on macOS has been added +// XFAIL: using-built-library-before-llvm-19 && !darwin  // <locale> diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp index 58bc9e5..57eedc8 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp @@ -6,12 +6,10 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) changed behavior of  // FP parsing. This requires 3e15c97fa3812993bdc319827a5c6d867b765ae8 in the dylib. -// XFAIL: using-built-library-before-llvm-19 +// TODO: Remove && !darwin once availability markup for LLVM 19 on macOS has been added +// XFAIL: using-built-library-before-llvm-19 && !darwin  // <locale> diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp index bf8bb65..8324ee3 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp @@ -6,12 +6,10 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) changed behavior of  // FP parsing. This requires 3e15c97fa3812993bdc319827a5c6d867b765ae8 in the dylib. -// XFAIL: using-built-library-before-llvm-19 +// TODO: Remove && !darwin once availability markup for LLVM 19 on macOS has been added +// XFAIL: using-built-library-before-llvm-19 && !darwin  // <locale> diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp index a87c5e0..11ec754 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp @@ -5,10 +5,7 @@  // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception  //  //===----------------------------------------------------------------------===// - -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang - +//  // NetBSD does not support LC_NUMERIC at the moment  // XFAIL: netbsd @@ -63,7 +60,7 @@ int main(int, char**)      }      {          std::locale l(LOCALE_fr_FR_UTF_8); -#if defined(TEST_HAS_GLIBC) || defined(_WIN32) || defined(_AIX) +#if defined(TEST_HAS_GLIBC) || defined(_WIN32) || defined(_AIX) || defined(__APPLE__)          const char* const group = "\3";  #else          const char* const group = "\x7f"; diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp index ef39e8a..53f2c85 100644 --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // NetBSD does not support LC_NUMERIC at the moment  // XFAIL: netbsd @@ -69,7 +66,7 @@ int main(int, char**)          // The below tests work around GLIBC's use of U202F as LC_NUMERIC thousands_sep.          std::locale l(LOCALE_fr_FR_UTF_8);          { -#if defined(_CS_GNU_LIBC_VERSION) || defined(_WIN32) || defined(_AIX) +#if defined(_CS_GNU_LIBC_VERSION) || defined(_WIN32) || defined(_AIX) || defined(__APPLE__)              const char sep = ' ';  #else              const char sep = ','; diff --git a/libcxx/test/std/strings/basic.string/string.capacity/deallocate_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/deallocate_size.pass.cpp index 00f9e2b..ecdc397 100644 --- a/libcxx/test/std/strings/basic.string/string.capacity/deallocate_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.capacity/deallocate_size.pass.cpp @@ -12,12 +12,14 @@  #include <string>  #include <cassert> +#include <cstddef>  #include <cstdint>  #include <type_traits>  #include "test_macros.h" -static int allocated_; +static std::uint64_t allocated_; +static std::uint64_t deallocated_;  template <class T, class Sz>  struct test_alloc { @@ -41,12 +43,12 @@ struct test_alloc {    pointer allocate(size_type n, const void* = nullptr) {      allocated_ += n; -    return std::allocator<value_type>().allocate(n); +    return std::allocator<value_type>().allocate(static_cast<std::size_t>(n));    }    void deallocate(pointer p, size_type s) { -    allocated_ -= s; -    std::allocator<value_type>().deallocate(p, s); +    deallocated_ += s; +    std::allocator<value_type>().deallocate(p, static_cast<std::size_t>(s));    }    template <class U> @@ -64,14 +66,13 @@ struct test_alloc {  template <class Sz>  void test() { -  for (int i = 1; i < 1000; ++i) { -    using Str = std::basic_string<char, std::char_traits<char>, test_alloc<char, Sz> >; +  for (unsigned int i = 1; i < 1000; ++i) {      { -      Str s(i, 't'); -      assert(allocated_ == 0 || allocated_ >= i); +      std::basic_string<char, std::char_traits<char>, test_alloc<char, Sz> > s(i, 't'); +      (void)s;      } +    assert(allocated_ == deallocated_);    } -  assert(allocated_ == 0);  }  int main(int, char**) { diff --git a/libcxx/test/std/time/time.duration/time.duration.nonmember/ostream.pass.cpp b/libcxx/test/std/time/time.duration/time.duration.nonmember/ostream.pass.cpp index 4e84db9..97ac0427 100644 --- a/libcxx/test/std/time/time.duration/time.duration.nonmember/ostream.pass.cpp +++ b/libcxx/test/std/time/time.duration/time.duration.nonmember/ostream.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // UNSUPPORTED: c++03, c++11, c++14, c++17  // UNSUPPORTED: no-localization  // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME @@ -83,17 +80,10 @@ static void test_values() {    assert(stream_c_locale<CharT>(1'000.123456s) == SV("1000.1235s"));    if constexpr (std::same_as<CharT, char>) { -#if defined(__APPLE__) -    assert(stream_fr_FR_locale<CharT>(-1'000'000s) == SV("-1000000s")); -    assert(stream_fr_FR_locale<CharT>(1'000'000s) == SV("1000000s")); -    assert(stream_fr_FR_locale<CharT>(-1'000.123456s) == SV("-1000,1235s")); -    assert(stream_fr_FR_locale<CharT>(1'000.123456s) == SV("1000,1235s")); -#else      assert(stream_fr_FR_locale<CharT>(-1'000'000s) == SV("-1 000 000s"));      assert(stream_fr_FR_locale<CharT>(1'000'000s) == SV("1 000 000s"));      assert(stream_fr_FR_locale<CharT>(-1'000.123456s) == SV("-1 000,1235s"));      assert(stream_fr_FR_locale<CharT>(1'000.123456s) == SV("1 000,1235s")); -#endif    } else {  #ifndef TEST_HAS_NO_WIDE_CHARACTERS      assert(stream_fr_FR_locale<CharT>(-1'000'000s) == L"-1" FR_THOU_SEP "000" FR_THOU_SEP "000s"); diff --git a/libcxx/test/std/time/time.syn/formatter.duration.pass.cpp b/libcxx/test/std/time/time.syn/formatter.duration.pass.cpp index 973bce8..f1f7deb 100644 --- a/libcxx/test/std/time/time.syn/formatter.duration.pass.cpp +++ b/libcxx/test/std/time/time.syn/formatter.duration.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // UNSUPPORTED: c++03, c++11, c++14, c++17  // UNSUPPORTED: no-localization  // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME @@ -408,19 +405,11 @@ static void test_valid_positive_integral_values() {             "%OM='00'\t"             "%S='00'\t"             "%OS='00'\t" -#  if defined(__APPLE__) -           "%p='AM'\t" -#  else             "%p='午前'\t" -#  endif             "%R='00:00'\t"             "%T='00:00:00'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='12:00:00 AM'\t" -#    else             "%r='12:00:00 午前'\t" -#    endif             "%X='00時00分00秒'\t"             "%EX='00時00分00秒'\t"  #  elif defined(_WIN32) @@ -448,19 +437,11 @@ static void test_valid_positive_integral_values() {             "%OM='59'\t"             "%S='59'\t"             "%OS='59'\t" -#  if defined(__APPLE__) -           "%p='AM'\t" -#  else             "%p='午前'\t" -#  endif             "%R='11:59'\t"             "%T='11:59:59'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='11:59:59 AM'\t" -#    else             "%r='11:59:59 午前'\t" -#    endif             "%X='11時59分59秒'\t"             "%EX='11時59分59秒'\t"  #  elif defined(_WIN32) @@ -488,19 +469,11 @@ static void test_valid_positive_integral_values() {             "%OM='00'\t"             "%S='00'\t"             "%OS='00'\t" -#  if defined(__APPLE__) -           "%p='PM'\t" -#  else             "%p='午後'\t" -#  endif             "%R='12:00'\t"             "%T='12:00:00'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='12:00:00 PM'\t" -#    else             "%r='12:00:00 午後'\t" -#    endif             "%X='12時00分00秒'\t"             "%EX='12時00分00秒'\t"  #  else @@ -528,19 +501,11 @@ static void test_valid_positive_integral_values() {             "%OM='59'\t"             "%S='59'\t"             "%OS='59'\t" -#  if defined(__APPLE__) -           "%p='PM'\t" -#  else             "%p='午後'\t" -#  endif             "%R='23:59'\t"             "%T='23:59:59'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='11:59:59 PM'\t" -#    else             "%r='11:59:59 午後'\t" -#    endif             "%X='23時59分59秒'\t"             "%EX='23時59分59秒'\t"  #  else @@ -568,19 +533,11 @@ static void test_valid_positive_integral_values() {             "%OM='00'\t"             "%S='00'\t"             "%OS='00'\t" -#  if defined(__APPLE__) -           "%p='AM'\t" -#  else             "%p='午前'\t" -#  endif             "%R='00:00'\t"             "%T='00:00:00'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='12:00:00 AM'\t" -#    else             "%r='12:00:00 午前'\t" -#    endif             "%X='00時00分00秒'\t"             "%EX='00時00分00秒'\t"  #  elif defined(_WIN32) @@ -835,19 +792,11 @@ static void test_valid_negative_integral_values() {             "%OM='59'\t"             "%S='59'\t"             "%OS='59'\t" -#  if defined(__APPLE__) -           "%p='PM'\t" -#  else             "%p='午後'\t" -#  endif             "%R='23:59'\t"             "%T='23:59:59'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='11:59:59 PM'\t" -#    else             "%r='11:59:59 午後'\t" -#    endif             "%X='23時59分59秒'\t"             "%EX='23時59分59秒'\t"  #  elif defined(_WIN32) diff --git a/libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp b/libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp index 28a972b..e258c41 100644 --- a/libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp +++ b/libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // UNSUPPORTED: c++03, c++11, c++14, c++17  // UNSUPPORTED: no-localization  // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME @@ -695,19 +692,11 @@ static void test_valid_values_time() {             "%OM='00'\t"             "%S='00'\t"             "%OS='00'\t" -#  if defined(__APPLE__) -           "%p='AM'\t" -#  else             "%p='午前'\t" -#  endif             "%R='00:00'\t"             "%T='00:00:00'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='12:00:00 AM'\t" -#    else             "%r='12:00:00 午前'\t" -#    endif             "%X='00時00分00秒'\t"             "%EX='00時00分00秒'\t"  #  elif defined(_WIN32) @@ -732,19 +721,11 @@ static void test_valid_values_time() {             "%OM='31'\t"             "%S='30.123'\t"             "%OS='30.123'\t" -#  if defined(__APPLE__) -           "%p='PM'\t" -#  else             "%p='午後'\t" -#  endif             "%R='23:31'\t"             "%T='23:31:30.123'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='11:31:30 PM'\t" -#    else             "%r='11:31:30 午後'\t" -#    endif             "%X='23時31分30秒'\t"             "%EX='23時31分30秒'\t"  #  elif defined(_WIN32) diff --git a/libcxx/test/std/time/time.syn/formatter.hh_mm_ss.pass.cpp b/libcxx/test/std/time/time.syn/formatter.hh_mm_ss.pass.cpp index 82d9b4c..bbd9c07 100644 --- a/libcxx/test/std/time/time.syn/formatter.hh_mm_ss.pass.cpp +++ b/libcxx/test/std/time/time.syn/formatter.hh_mm_ss.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // UNSUPPORTED: c++03, c++11, c++14, c++17  // UNSUPPORTED: no-localization  // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME @@ -302,19 +299,11 @@ static void test_valid_values() {             "%OM='00'\t"             "%S='00'\t"             "%OS='00'\t" -#  if defined(__APPLE__) -           "%p='AM'\t" -#  else             "%p='午前'\t" -#  endif             "%R='00:00'\t"             "%T='00:00:00'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='12:00:00 AM'\t" -#    else             "%r='12:00:00 午前'\t" -#    endif             "%X='00時00分00秒'\t"             "%EX='00時00分00秒'\t"  #  elif defined(_WIN32) @@ -339,19 +328,11 @@ static void test_valid_values() {             "%OM='31'\t"             "%S='30.123'\t"             "%OS='30.123'\t" -#  if defined(__APPLE__) -           "%p='PM'\t" -#  else             "%p='午後'\t" -#  endif             "%R='23:31'\t"             "%T='23:31:30.123'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='11:31:30 PM'\t" -#    else             "%r='11:31:30 午後'\t" -#    endif             "%X='23時31分30秒'\t"             "%EX='23時31分30秒'\t"  #  elif defined(_WIN32) @@ -376,19 +357,11 @@ static void test_valid_values() {             "%OM='02'\t"             "%S='01.123456789012'\t"             "%OS='01.123456789012'\t" -#  if defined(__APPLE__) -           "%p='AM'\t" -#  else             "%p='午前'\t" -#  endif             "%R='03:02'\t"             "%T='03:02:01.123456789012'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='03:02:01 AM'\t" -#    else             "%r='03:02:01 午前'\t" -#    endif             "%X='03時02分01秒'\t"             "%EX='03時02分01秒'\t"  #  elif defined(_WIN32) @@ -413,19 +386,11 @@ static void test_valid_values() {             "%OM='01'\t"             "%S='01'\t"             "%OS='01'\t" -#  if defined(__APPLE__) -           "%p='AM'\t" -#  else             "%p='午前'\t" -#  endif             "%R='01:01'\t"             "%T='01:01:01'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='01:01:01 AM'\t" -#    else             "%r='01:01:01 午前'\t" -#    endif             "%X='01時01分01秒'\t"             "%EX='01時01分01秒'\t"  #  elif defined(_WIN32) diff --git a/libcxx/test/std/time/time.syn/formatter.local_time.pass.cpp b/libcxx/test/std/time/time.syn/formatter.local_time.pass.cpp index bd23337..ce3af8e 100644 --- a/libcxx/test/std/time/time.syn/formatter.local_time.pass.cpp +++ b/libcxx/test/std/time/time.syn/formatter.local_time.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // UNSUPPORTED: c++03, c++11, c++14, c++17  // UNSUPPORTED: no-localization  // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME @@ -694,19 +691,11 @@ static void test_valid_values_time() {             "%OM='00'\t"             "%S='00'\t"             "%OS='00'\t" -#  if defined(__APPLE__) -           "%p='AM'\t" -#  else             "%p='午前'\t" -#  endif             "%R='00:00'\t"             "%T='00:00:00'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='12:00:00 AM'\t" -#    else             "%r='12:00:00 午前'\t" -#    endif             "%X='00時00分00秒'\t"             "%EX='00時00分00秒'\t"  #  elif defined(_WIN32) @@ -731,19 +720,11 @@ static void test_valid_values_time() {             "%OM='31'\t"             "%S='30.123'\t"             "%OS='30.123'\t" -#  if defined(__APPLE__) -           "%p='PM'\t" -#  else             "%p='午後'\t" -#  endif             "%R='23:31'\t"             "%T='23:31:30.123'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='11:31:30 PM'\t" -#    else             "%r='11:31:30 午後'\t" -#    endif             "%X='23時31分30秒'\t"             "%EX='23時31分30秒'\t"  #  elif defined(_WIN32) diff --git a/libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp b/libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp index 9c9c8e0..9238f3d 100644 --- a/libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp +++ b/libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp @@ -6,9 +6,6 @@  //  //===----------------------------------------------------------------------===// -// TODO(mordante) Investigate -// UNSUPPORTED: apple-clang -  // UNSUPPORTED: c++03, c++11, c++14, c++17  // UNSUPPORTED: no-localization  // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME @@ -691,19 +688,11 @@ static void test_valid_values_time() {             "%OM='00'\t"             "%S='00'\t"             "%OS='00'\t" -#  if defined(__APPLE__) -           "%p='AM'\t" -#  else             "%p='午前'\t" -#  endif             "%R='00:00'\t"             "%T='00:00:00'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='12:00:00 AM'\t" -#    else             "%r='12:00:00 午前'\t" -#    endif             "%X='00時00分00秒'\t"             "%EX='00時00分00秒'\t"  #  elif defined(_WIN32) @@ -728,19 +717,11 @@ static void test_valid_values_time() {             "%OM='31'\t"             "%S='30.123'\t"             "%OS='30.123'\t" -#  if defined(__APPLE__) -           "%p='PM'\t" -#  else             "%p='午後'\t" -#  endif             "%R='23:31'\t"             "%T='23:31:30.123'\t"  #  if defined(__APPLE__) || defined(__FreeBSD__) -#    if defined(__APPLE__) -           "%r='11:31:30 PM'\t" -#    else             "%r='11:31:30 午後'\t" -#    endif             "%X='23時31分30秒'\t"             "%EX='23時31分30秒'\t"  #  elif defined(_WIN32) diff --git a/libcxx/test/std/utilities/format/format.arguments/format.arg/visit.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.arg/visit.pass.cpp index 20e0a5e..68fe8b6 100644 --- a/libcxx/test/std/utilities/format/format.arguments/format.arg/visit.pass.cpp +++ b/libcxx/test/std/utilities/format/format.arguments/format.arg/visit.pass.cpp @@ -8,8 +8,6 @@  // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23  // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME -// The tested functionality needs deducing this. -// XFAIL: apple-clang  // <format> diff --git a/libcxx/test/std/utilities/format/format.arguments/format.arg/visit.return_type.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.arg/visit.return_type.pass.cpp index 8a79dd4..4ae63e8 100644 --- a/libcxx/test/std/utilities/format/format.arguments/format.arg/visit.return_type.pass.cpp +++ b/libcxx/test/std/utilities/format/format.arguments/format.arg/visit.return_type.pass.cpp @@ -8,8 +8,6 @@  // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23  // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME -// The tested functionality needs deducing this. -// XFAIL: apple-clang  // <format> diff --git a/libcxx/test/std/utilities/format/format.arguments/format.arg/visit_format_arg.deprecated.verify.cpp b/libcxx/test/std/utilities/format/format.arguments/format.arg/visit_format_arg.deprecated.verify.cpp index 146ceba..77df72d 100644 --- a/libcxx/test/std/utilities/format/format.arguments/format.arg/visit_format_arg.deprecated.verify.cpp +++ b/libcxx/test/std/utilities/format/format.arguments/format.arg/visit_format_arg.deprecated.verify.cpp @@ -8,7 +8,6 @@  // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23  // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME -// XFAIL: apple-clang  // <format> diff --git a/libcxx/test/std/utilities/format/format.arguments/format.arg/visit_format_arg.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.arg/visit_format_arg.pass.cpp index d99675a7..9b7c8a7 100644 --- a/libcxx/test/std/utilities/format/format.arguments/format.arg/visit_format_arg.pass.cpp +++ b/libcxx/test/std/utilities/format/format.arguments/format.arg/visit_format_arg.pass.cpp @@ -9,6 +9,8 @@  // UNSUPPORTED: c++03, c++11, c++14, c++17  // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS +  // <format>  // template<class Visitor, class Context> @@ -25,10 +27,6 @@  #include "make_string.h"  #include "min_allocator.h" -#if TEST_STD_VER >= 26 && defined(TEST_HAS_EXPLICIT_THIS_PARAMETER) -TEST_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations") -#endif -  template <class Context, class To, class From>  void test(From value) {    auto store = std::make_format_args<Context>(value); diff --git a/libcxx/test/std/utilities/format/format.arguments/format.args/get.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.args/get.pass.cpp index c7dd82d..cbddc4f 100644 --- a/libcxx/test/std/utilities/format/format.arguments/format.args/get.pass.cpp +++ b/libcxx/test/std/utilities/format/format.arguments/format.args/get.pass.cpp @@ -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)); @@ -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)); @@ -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)); diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp index d78de0e..0f6a673 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp @@ -16,17 +16,6 @@  #include <tuple>  #include <string>  #include <cassert> -#include "test_macros.h" - -#if TEST_HAS_BUILTIN(__reference_constructs_from_temporary) -#  define ASSERT_REFERENCE_BINDS_TEMPORARY(...) static_assert(__reference_constructs_from_temporary(__VA_ARGS__), "") -#  define ASSERT_NOT_REFERENCE_BINDS_TEMPORARY(...)                                                                    \ -    static_assert(!__reference_constructs_from_temporary(__VA_ARGS__), "") -#else -// TODO(LLVM 22): Remove this as all support compilers should have __reference_constructs_from_temporary implemented. -#  define ASSERT_REFERENCE_BINDS_TEMPORARY(...) static_assert(__reference_binds_to_temporary(__VA_ARGS__), "") -#  define ASSERT_NOT_REFERENCE_BINDS_TEMPORARY(...) static_assert(!__reference_binds_to_temporary(__VA_ARGS__), "") -#endif  template <class Tp>  struct ConvertsTo { @@ -42,17 +31,6 @@ struct ConvertsTo {  struct Base {};  struct Derived : Base {}; - -static_assert(std::is_same<decltype("abc"), decltype(("abc"))>::value, ""); -ASSERT_REFERENCE_BINDS_TEMPORARY(std::string const&, decltype("abc")); -ASSERT_REFERENCE_BINDS_TEMPORARY(std::string const&, decltype(("abc"))); -ASSERT_REFERENCE_BINDS_TEMPORARY(std::string const&, const char*&&); - -ASSERT_NOT_REFERENCE_BINDS_TEMPORARY(int&, const ConvertsTo<int&>&); -ASSERT_NOT_REFERENCE_BINDS_TEMPORARY(const int&, ConvertsTo<int&>&); -ASSERT_NOT_REFERENCE_BINDS_TEMPORARY(Base&, Derived&); - -  static_assert(std::is_constructible<int&, std::reference_wrapper<int>>::value, "");  static_assert(std::is_constructible<int const&, std::reference_wrapper<int>>::value, ""); diff --git a/libcxx/test/std/utilities/variant/variant.visit.member/robust_against_adl.pass.cpp b/libcxx/test/std/utilities/variant/variant.visit.member/robust_against_adl.pass.cpp index 7be7c7f..38cf34a 100644 --- a/libcxx/test/std/utilities/variant/variant.visit.member/robust_against_adl.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.visit.member/robust_against_adl.pass.cpp @@ -7,7 +7,6 @@  //===----------------------------------------------------------------------===//  // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23 -// XFAIL: apple-clang  // <variant> diff --git a/libcxx/test/std/utilities/variant/variant.visit.member/visit.pass.cpp b/libcxx/test/std/utilities/variant/variant.visit.member/visit.pass.cpp index f68112d..aeb1297 100644 --- a/libcxx/test/std/utilities/variant/variant.visit.member/visit.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.visit.member/visit.pass.cpp @@ -7,8 +7,6 @@  //===----------------------------------------------------------------------===//  // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23 -// The tested functionality needs deducing this. -// XFAIL: apple-clang  // <variant> diff --git a/libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp b/libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp index 90320ae..7ca0590 100644 --- a/libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp @@ -7,8 +7,6 @@  //===----------------------------------------------------------------------===//  // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23 -// The tested functionality needs deducing this. -// XFAIL: apple-clang  // <variant> diff --git a/libcxx/test/support/locale_helpers.h b/libcxx/test/support/locale_helpers.h index 946c2fe..3cec739 100644 --- a/libcxx/test/support/locale_helpers.h +++ b/libcxx/test/support/locale_helpers.h @@ -73,6 +73,12 @@ MultiStringType currency_symbol_ru_RU() {      return MKSTR("\u20BD"); // U+20BD RUBLE SIGN  #elif defined(_WIN32) || defined(__FreeBSD__) || defined(_AIX)    return MKSTR("\u20BD"); // U+20BD RUBLE SIGN +#elif defined(__APPLE__) +  if (__builtin_available(macOS 15.4, *)) { +    return MKSTR("\u20BD"); // U+20BD RUBLE SIGN +  } else { +    return MKSTR("\u0440\u0443\u0431."); +  }  #else    return MKSTR("\u0440\u0443\u0431.");  #endif @@ -81,6 +87,12 @@ MultiStringType currency_symbol_ru_RU() {  MultiStringType currency_symbol_zh_CN() {  #if defined(_WIN32)    return MKSTR("\u00A5"); // U+00A5 YEN SIGN +#elif defined(__APPLE__) +  if (__builtin_available(macOS 15.4, *)) { +    return MKSTR("\u00A5"); // U+00A5 YEN SIGN +  } else { +    return MKSTR("\uFFE5"); // U+FFE5 FULLWIDTH YEN SIGN +  }  #else    return MKSTR("\uFFE5"); // U+FFE5 FULLWIDTH YEN SIGN  #endif diff --git a/libcxx/test/support/test_basic_format_arg.h b/libcxx/test/support/test_basic_format_arg.h index f51f6e9..99cd558 100644 --- a/libcxx/test/support/test_basic_format_arg.h +++ b/libcxx/test/support/test_basic_format_arg.h @@ -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); diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h index c4e1600..8d88d6f 100644 --- a/libcxx/test/support/test_macros.h +++ b/libcxx/test/support/test_macros.h @@ -531,13 +531,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 | 
