aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorBilly Robert O'Neal III <bion@microsoft.com>2017-05-08 21:52:05 +0000
committerBilly Robert O'Neal III <bion@microsoft.com>2017-05-08 21:52:05 +0000
commit8c401179a33273d9e606a648881885564298b989 (patch)
tree6fa76bd2e220c1ebc1c1b2bb1c0301fade890799 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent58a2e0d90b569eb8acf6cfecaeef5fe5ba4aee00 (diff)
downloadllvm-8c401179a33273d9e606a648881885564298b989.zip
llvm-8c401179a33273d9e606a648881885564298b989.tar.gz
llvm-8c401179a33273d9e606a648881885564298b989.tar.bz2
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
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions