llvm-project/libcxx/test/std/utilities/utility/pairs/pairs.pair
Stephan T. Lavavej 0f66190aef [libcxx] [test] Avoid MSVC truncation warnings.
MSVC emits "warning C4244: 'initializing': conversion from 'int'
to 'short', possible loss of data" when it sees pair<Whatever, short>
constructed from (whatever, 4), because int is being truncated to
short within pair's constructor. (The compiler doesn't take into
account the fact that 4 is a literal at the callsite; it generates
this warning when the constructor is instantiated, because it might
be called with a runtime-valued int that would actually truncate.)

Instead of static_cast<short>, we can simply change short to int
in these tests, without affecting the pair operations that they're
trying to test: move assignment, convert copy construction, and
convert move construction.

Fixes D45016.

llvm-svn: 329973
2018-04-12 23:56:07 +00:00
..
U_V.pass.cpp Refactor test archetypes implementation. 2016-08-11 07:04:14 +00:00
assign_const_pair_U_V.pass.cpp fix typo in align_const_pair_U_V.pass.cpp 2018-03-29 03:44:01 +00:00
assign_pair.pass.cpp Recommit r276548 - Make pair/tuples assignment operators SFINAE properly. 2016-07-25 02:36:42 +00:00
assign_pair_cxx03.pass.cpp Remove all usages of REQUIRES-ANY in the test suite. 2017-01-24 09:11:08 +00:00
assign_rv_pair.pass.cpp [libcxx] [test] Avoid MSVC truncation warnings. 2018-04-12 23:56:07 +00:00
assign_rv_pair_U_V.pass.cpp Move libc++ pair/tuple assign test to libcxx/ test directory. 2018-03-29 03:30:00 +00:00
const_first_const_second.pass.cpp Refactor test archetypes implementation. 2016-08-11 07:04:14 +00:00
const_first_const_second_cxx03.pass.cpp Implement the std::pair parts of "Improving pair and tuple". Completes N4387. 2016-07-25 04:32:07 +00:00
const_pair_U_V.pass.cpp [libcxx] [test] Avoid MSVC truncation warnings. 2018-04-12 23:56:07 +00:00
const_pair_U_V_cxx03.pass.cpp [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 3/7. 2016-12-08 21:38:14 +00:00
copy_ctor.pass.cpp [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 3/7. 2016-12-08 21:38:14 +00:00
default-sfinae.pass.cpp [libcxx] [test] Fix comment typos, strip trailing whitespace. 2017-01-18 20:10:25 +00:00
default.pass.cpp [libcxx] [test] Fix Clang -Wunused-local-typedef, part 3/3. 2017-02-05 22:47:54 +00:00
dtor.pass.cpp [libcxx] [test] Strip trailing whitespace. NFC. 2017-06-20 21:00:02 +00:00
implicit_deduction_guides.pass.cpp Add C++17 explicit deduction guides to std::pair. 2017-10-04 00:04:26 +00:00
move_ctor.pass.cpp [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 3/7. 2016-12-08 21:38:14 +00:00
not_constexpr_cxx11.fail.cpp Implement the std::pair parts of "Improving pair and tuple". Completes N4387. 2016-07-25 04:32:07 +00:00
piecewise.pass.cpp Cleanup _LIBCPP_HAS_NO_<c++11-feature> in the utilities library 2017-04-19 00:56:32 +00:00
rv_pair_U_V.pass.cpp [libcxx] [test] Avoid MSVC truncation warnings. 2018-04-12 23:56:07 +00:00
special_member_generation_test.pass.cpp Refactor test archetypes implementation. 2016-08-11 07:04:14 +00:00
swap.pass.cpp [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 3/7. 2016-12-08 21:38:14 +00:00
trivial_copy_move.pass.cpp Disable trivial pair copy/move tests when unsupported 2016-10-12 20:26:47 +00:00
types.pass.cpp