llvm-project/libcxx/test/std/numerics/numeric.ops/numeric.ops.gcd
Billy Robert O'Neal III 8c401179a3 Resolve integer overflow warnings in GCD and LCM tests
lcm.pass.cpp:
19: Update headers to that actually used in the test.
41: test0 was triggering narrowing warnings for all callers, because the
inputs were always ints, but some of the explicit template arguments were
smaller than that. Instead, have this function accept ints and static_cast
explicitly to the types we want before calling std::lcm.
47: Replace unnecessary ternary.
55: Use foo_t instead of typename foo<>::type
111/116: intX_t were not std::qualified but only <cfoo> headers were included.
141: C1XX has a bug where it interprets 2147483648 as unsigned int. Then the
negation trips "negation of unsigned value, result still unsigned" warnings.
Perma-workaround this issue by saying INT_MIN, which better documents the
intended behavior and avoids triggering warnings on C1XX.

gcd.pass.cpp:
Same changes as lcm.pass.cpp but for GCD.

llvm-svn: 302472
2017-05-08 21:52:05 +00:00
..
gcd.bool1.fail.cpp [libcxx] [test] D27027: Strip trailing whitespace. 2016-11-23 22:03:28 +00:00
gcd.bool2.fail.cpp [libcxx] [test] D27027: Strip trailing whitespace. 2016-11-23 22:03:28 +00:00
gcd.bool3.fail.cpp [libcxx] [test] D27027: Strip trailing whitespace. 2016-11-23 22:03:28 +00:00
gcd.bool4.fail.cpp [libcxx] [test] D27027: Strip trailing whitespace. 2016-11-23 22:03:28 +00:00
gcd.not_integral1.fail.cpp [libcxx] [test] D27027: Strip trailing whitespace. 2016-11-23 22:03:28 +00:00
gcd.not_integral2.fail.cpp [libcxx] [test] D27027: Strip trailing whitespace. 2016-11-23 22:03:28 +00:00
gcd.pass.cpp Resolve integer overflow warnings in GCD and LCM tests 2017-05-08 21:52:05 +00:00