llvm-project/libcxx/test/std/utilities/utility
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
..
as_const [libcxx] [test] Untabify, NFC. 2017-07-29 00:55:10 +00:00
declval Fix a handful of tests that fail in C++03 2015-07-28 07:31:50 +00:00
exchange [libcxx] [test] Strip trailing whitespace, NFC. 2018-02-12 22:54:35 +00:00
forward Fix two failing -verify tests to tolerate old and new clang versions 2017-09-17 21:50:59 +00:00
operators
pairs [libcxx] [test] Avoid MSVC truncation warnings. 2018-04-12 23:56:07 +00:00
utility.inplace Test changes for P0504R0 "Revisiting in-place tag types for any/optional/variant". Patch from Casey Carter 2016-11-17 19:23:35 +00:00
utility.swap Add is_swappable/is_nothrow_swappable traits 2016-04-21 23:38:59 +00:00
synopsis.pass.cpp Placate unused variable warnings uncovered by improvements to clang's -Wunused-variable 2017-10-14 15:52:38 +00:00