llvm.org GIT mirror llvm / 5550ec1
Silence gcc warning in testcase [NFC] Without the fix gcc (7.4.0) complains with ../unittests/ADT/APIntTest.cpp: In member function 'virtual void {anonymous}::APIntTest_MultiplicativeInverseExaustive_Test::TestBody()': ../unittests/ADT/APIntTest.cpp:2510:36: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] for (unsigned Value = 0; Value < (1 << BitWidth); ++Value) { ~~~~~~^~~~~~~~~~~~~~~~~ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364624 91177308-0d34-0410-b5e6-96231b3b80d8 Mikael Holmen a month ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
25062506
25072507 TEST(APIntTest, MultiplicativeInverseExaustive) {
25082508 for (unsigned BitWidth = 1; BitWidth <= 16; ++BitWidth) {
2509 for (unsigned Value = 0; Value < (1 << BitWidth); ++Value) {
2509 for (unsigned Value = 0; Value < (1u << BitWidth); ++Value) {
25102510 APInt V = APInt(BitWidth, Value);
25112511 APInt MulInv =
25122512 V.zext(BitWidth + 1)