Skip to content

Commit fb7c87c

Browse files
mordanteldionne
authored andcommitted
Fixes most compilation issues.
Two test still fail but need a bit more investigation.
1 parent b4d3840 commit fb7c87c

File tree

14 files changed

+21
-6
lines changed

14 files changed

+21
-6
lines changed

libcxx/include/__format/parser_std_format_spec.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,8 +1155,8 @@ __estimate_column_width(basic_string_view<_CharT> __str, size_t __maximum, __col
11551155
// When Unicode isn't supported assume ASCII and every code unit is one code
11561156
// point. In ASCII the estimated column width is always one. Thus there's no
11571157
// need for rounding.
1158-
size_t __width_ = std::min(__str.size(), __maximum);
1159-
return {__width_, __str.begin() + __width_};
1158+
size_t __width = std::min(__str.size(), __maximum);
1159+
return {__width, __str.begin() + __width};
11601160
}
11611161

11621162
# endif // !defined(_LIBCPP_HAS_NO_UNICODE)

libcxx/test/libcxx/input.output/iostream.format/output.streams/ostream.formatted/ostream.formatted.print/vprint_unicode.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
99
// UNSUPPORTED: no-filesystem, no-rtti
10+
// UNSUPPORTED: libcpp-has-no-unicode
1011
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
1112

1213
// XFAIL: availability-fp_to_chars-missing

libcxx/test/libcxx/input.output/iostream.format/print.fun/transcoding.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
99
// UNSUPPORTED: no-filesystem
10+
// UNSUPPORTED: libcpp-has-no-unicode
1011
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
1112
// ADDITIONAL_COMPILE_FLAGS(has-fconstexpr-steps): -fconstexpr-steps=2000000
1213

libcxx/test/libcxx/input.output/iostream.format/print.fun/vprint_unicode_posix.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
99
// UNSUPPORTED: no-filesystem
10+
// UNSUPPORTED: libcpp-has-no-unicode
1011
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
1112

1213
// XFAIL: availability-fp_to_chars-missing

libcxx/test/libcxx/input.output/iostream.format/print.fun/vprint_unicode_windows.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
99
// UNSUPPORTED: no-filesystem
1010
// UNSUPPORTED: no-wide-characters
11+
// UNSUPPORTED: libcpp-has-no-unicode
1112
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
1213

1314
// Clang modules do not work with the definiton of _LIBCPP_TESTING_PRINT_WRITE_TO_WINDOWS_CONSOLE_FUNCTION

libcxx/test/libcxx/utilities/format/format.functions/ascii.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// UNSUPPORTED: c++03, c++11, c++14, c++17
99
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
1010

11+
// What would be the best way to force the test with unicode disabled?
1112
// Force unicode to be disabled.
1213
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_HAS_NO_UNICODE
1314

libcxx/test/libcxx/utilities/format/format.functions/escaped_output.ascii.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// TODO FMT This test should not require std::to_chars(floating-point)
1212
// XFAIL: availability-fp_to_chars-missing
1313

14+
// What would be the best way to force the test with unicode disabled?
1415
// Force unicode to be disabled.
1516
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_HAS_NO_UNICODE
1617

libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//===----------------------------------------------------------------------===//
77

88
// UNSUPPORTED: c++03, c++11, c++14, c++17
9+
// UNSUPPORTED: libcpp-has-no-unicode
910
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
1011

1112
// <format>

libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.formatted.print/locale-specific_form.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ test(std::stringstream& stream, std::string expected, test_format_string<char, A
6666
"\nFormat string ", fmt.get(), "\nExpected output ", expected, "\nActual output ", out, '\n'));
6767
}
6868
// *** vprint_unicode ***
69+
#ifndef TEST_HAS_NO_UNICODE
6970
{
7071
stream.str("");
7172

@@ -75,6 +76,7 @@ test(std::stringstream& stream, std::string expected, test_format_string<char, A
7576
TEST_WRITE_CONCATENATED(
7677
"\nFormat string ", fmt.get(), "\nExpected output ", expected, "\nActual output ", out, '\n'));
7778
}
79+
#endif // TEST_HAS_NO_UNICODE
7880
// *** vprint_nonunicode ***
7981
{
8082
stream.str("");

libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.formatted.print/vprint_unicode.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//===----------------------------------------------------------------------===//
77

88
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
9+
// UNSUPPORTED: libcpp-has-no-unicode
910
// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
1011

1112
// TODO PRINT Investigate see https://reviews.llvm.org/D156585

0 commit comments

Comments
 (0)