[libcxx] r331575 - [libcxx] [test] Fix MSVC x64 truncation warning.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Fri May 4 18:40:24 PDT 2018


Author: stl_msft
Date: Fri May  4 18:40:24 2018
New Revision: 331575

URL: http://llvm.org/viewvc/llvm-project?rev=331575&view=rev
Log:
[libcxx] [test] Fix MSVC x64 truncation warning.

warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data

Requesting post-commit review.

Modified:
    libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp

Modified: libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp?rev=331575&r1=331574&r2=331575&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp Fri May  4 18:40:24 2018
@@ -50,7 +50,7 @@ protected:
                 str_.resize(str_.capacity());
                 base::setp(const_cast<CharT*>(str_.data()),
                            const_cast<CharT*>(str_.data() + str_.size()));
-                base::pbump(n+1);
+                base::pbump(static_cast<int>(n+1));
             }
             return ch;
         }




More information about the cfe-commits mailing list