[libcxx-commits] [PATCH] D120751: [libc++] Fix initialization of __fill_
Jake Egan via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 2 12:59:41 PST 2022
Jake-Egan updated this revision to Diff 412517.
Jake-Egan edited the summary of this revision.
Jake-Egan added a comment.
Rebase to hopefully fix format check
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120751/new/
https://reviews.llvm.org/D120751
Files:
libcxx/include/ios
libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp
Index: libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp
===================================================================
--- libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp
+++ libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/fill_char_type.pass.cpp
@@ -20,7 +20,6 @@
int main(int, char**)
{
std::ios ios(0);
- assert(ios.fill() == ' ');
char c = ios.fill('*');
assert(c == ' ');
assert(ios.fill() == '*');
Index: libcxx/include/ios
===================================================================
--- libcxx/include/ios
+++ libcxx/include/ios
@@ -781,6 +781,8 @@
_CharT
basic_ios<_CharT, _Traits>::fill(char_type __ch)
{
+ if (traits_type::eq_int_type(traits_type::eof(), __fill_))
+ __fill_ = widen(' ');
char_type __r = __fill_;
__fill_ = __ch;
return __r;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120751.412517.patch
Type: text/x-patch
Size: 919 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220302/05677218/attachment.bin>
More information about the libcxx-commits
mailing list