Skip to content

[libc++] Fix localization failures on macOS 15.4 #138744

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@
//
//===----------------------------------------------------------------------===//

// 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
// XFAIL: using-built-library-before-llvm-19

// <ios>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@
//
//===----------------------------------------------------------------------===//

// 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://github.com/llvm/llvm-project/issues/60509 in the dylib,
// which landed in 5afb937d8a30445642ccaf33866ee4cdd0713222.
// XFAIL using-built-library-before-llvm-19
// XFAIL: using-built-library-before-llvm-19

#include <fstream>
#include <cstddef>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@
//
//===----------------------------------------------------------------------===//

// TODO(mordante) Investigate
// UNSUPPORTED: apple-clang

// <istream>

// int sync();

// 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
// XFAIL: using-built-library-before-llvm-19

#include <istream>
#include <cassert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
//
//===----------------------------------------------------------------------===//

// TODO(mordante) Investigate
// UNSUPPORTED: apple-clang

// Bionic has minimal locale support, investigate this later.
// XFAIL: LIBCXX-ANDROID-FIXME

Expand Down Expand Up @@ -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
{
Expand All @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
//
//===----------------------------------------------------------------------===//

// TODO(mordante) Investigate
// UNSUPPORTED: apple-clang

// XFAIL darwin

// NetBSD does not support LC_MONETARY at the moment
// XFAIL: netbsd

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
//
//===----------------------------------------------------------------------===//

// TODO(mordante) Investigate
// UNSUPPORTED: apple-clang

// NetBSD does not support LC_MONETARY at the moment
// XFAIL: netbsd

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// TODO(mordante) Investigate
// UNSUPPORTED: apple-clang

//
// NetBSD does not support LC_MONETARY at the moment
// XFAIL: netbsd

Expand Down Expand Up @@ -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";
Expand All @@ -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";
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand All @@ -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";
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand All @@ -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";
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand All @@ -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";
Expand Down Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
//
//===----------------------------------------------------------------------===//

// TODO(mordante) Investigate
// UNSUPPORTED: apple-clang

// XFAIL darwin

// NetBSD does not support LC_MONETARY at the moment
// XFAIL: netbsd

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
//
//===----------------------------------------------------------------------===//

// TODO(mordante) Investigate
// UNSUPPORTED: apple-clang

// NetBSD does not support LC_MONETARY at the moment
// XFAIL: netbsd

Expand Down
Loading
Loading