-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc++] basic_ios<wchar_t> cannot store fill character WCHAR_MAX #89305
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
7bd12fb
Use lower max threads to reduce the testing time on AIX.
xingxue-ibm ecbcaa8
Changes for cases where wint_t and wchar_t have the same width. The c…
xingxue-ibm a54d54a
Addressed comments.
xingxue-ibm 8fa650a
Addressed comments.
xingxue-ibm c033ea9
Add _LIBCPP_HIDE_FROM_ABI.
xingxue-ibm 5288cb3
Removed changes in unrelated test case.
xingxue-ibm 00f4cd2
Add description of ABI change in ReleaseNote.
xingxue-ibm e71aafc
Address comment.
xingxue-ibm b2ba84c
Use helper class _FillHelper by default in ABI version 2.
xingxue-ibm 33e58ed
Remove unnecessary include of __type_traits/conditional.h.
xingxue-ibm 933f888
Addressed comments.
xingxue-ibm 7ef7b82
Rename init() to __init().
xingxue-ibm 9c493f3
Addressed comments.
xingxue-ibm a9280c0
Update libcxx/include/__configuration/abi.h
xingxue-ibm 68edd80
Update libcxx/include/__configuration/abi.h
xingxue-ibm c0f97c3
Update libcxx/include/__configuration/abi.h
xingxue-ibm 49f202f
Update libcxx/include/ios
xingxue-ibm 29a4635
Addressed comments.
xingxue-ibm 88fc9eb
Remove the unused macro definition for AIX/zOS in abi.h.
xingxue-ibm 446f895
Merge branch 'main' into ios-fill
xingxue-ibm 9ea946e
setfill() WCHAR_MAX instead of WEOF for the test.
xingxue-ibm bf8e923
Fixed format.
xingxue-ibm ab1cbf7
XFAIL targets where WEOF is the same as WCHAR_MAX in libcpp ABI versi…
xingxue-ibm 5338b67
Update libcxx/test/std/input.output/iostream.format/std.manip/setfill…
xingxue-ibm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
libcxx/test/std/input.output/iostream.format/std.manip/setfill_wchar_max.pass.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// Test that WCHAR_MAX as a wchar_t value can be set as the fill character. | ||
|
||
// UNSUPPORTED: no-wide-characters | ||
|
||
// Expect the test case to fail on targets where WEOF is the same as | ||
// WCHAR_MAX with the libcpp ABI version 1 implementation. The libcpp ABI | ||
// version 2 implementation fixes the problem. | ||
|
||
// XFAIL: target={{.*}}-windows{{.*}} && libcpp-abi-version=1 | ||
// XFAIL: target=armv{{7|8}}l-linux-gnueabihf && libcpp-abi-version=1 | ||
// XFAIL: target=aarch64-linux-gnu && libcpp-abi-version=1 | ||
|
||
#include <iomanip> | ||
#include <ostream> | ||
#include <cassert> | ||
#include <string> | ||
|
||
template <class CharT> | ||
struct testbuf : public std::basic_streambuf<CharT> { | ||
testbuf() {} | ||
}; | ||
|
||
int main(int, char**) { | ||
testbuf<wchar_t> sb; | ||
std::wostream os(&sb); | ||
os << std::setfill((wchar_t)WCHAR_MAX); | ||
assert(os.fill() == (wchar_t)WCHAR_MAX); | ||
|
||
return 0; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.