llvm.org GIT mirror llvm / 2699722
Fix -Woverflow warning in unittest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231368 91177308-0d34-0410-b5e6-96231b3b80d8 Frederic Riss 4 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
9696 // Check that we can handle big positive values, but that we return
9797 // an error just over the limit.
9898 auto UMax = createULEBFormValue(LLONG_MAX);
99 auto TooBig = createULEBFormValue(LLONG_MAX + 1);
99 auto TooBig = createULEBFormValue(uint64_t(LLONG_MAX) + 1);
100100 EXPECT_EQ(UMax.getAsSignedConstant().getValue(), LLONG_MAX);
101101 EXPECT_EQ(TooBig.getAsSignedConstant().hasValue(), false);
102102