diff options
author | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2017-07-19 22:02:22 +0000 |
---|---|---|
committer | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2017-07-19 22:02:22 +0000 |
commit | 14e60beb7108dc2c934eb1cb0b5ce4ab66457e30 (patch) | |
tree | 06ba913ef85fdefa7895c5783e20aeb76c79a43f /libcxx/test | |
parent | 36454afab5dec23a187a64483dd986c60aadeb3a (diff) | |
download | bcm5719-llvm-14e60beb7108dc2c934eb1cb0b5ce4ab66457e30.tar.gz bcm5719-llvm-14e60beb7108dc2c934eb1cb0b5ce4ab66457e30.zip |
[libcxx] [test] Fix MSVC warning C4242 "conversion from 'int' to 'const char', possible loss of data".
Fixes D34534.
llvm-svn: 308532
Diffstat (limited to 'libcxx/test')
2 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp b/libcxx/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp index a00cf139be9..66be9f0f7f1 100644 --- a/libcxx/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp @@ -40,7 +40,7 @@ protected: if (__c != base::traits_type::eof()) { int n = str_.size(); - str_.push_back(__c); + str_.push_back(static_cast<CharT>(__c)); str_.resize(str_.capacity()); base::setp(const_cast<CharT*>(str_.data()), const_cast<CharT*>(str_.data() + str_.size())); diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp index 29ed68e9770..a599d4d3d02 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp @@ -46,7 +46,7 @@ protected: if (__c != base::traits_type::eof()) { int n = str_.size(); - str_.push_back(__c); + str_.push_back(static_cast<CharT>(__c)); str_.resize(str_.capacity()); base::setp(const_cast<CharT*>(str_.data()), const_cast<CharT*>(str_.data() + str_.size())); |