[llvm] r231368 - Fix -Woverflow warning in unittest.
Frederic Riss
friss at apple.com
Thu Mar 5 06:43:16 PST 2015
Author: friss
Date: Thu Mar 5 08:43:15 2015
New Revision: 231368
URL: http://llvm.org/viewvc/llvm-project?rev=231368&view=rev
Log:
Fix -Woverflow warning in unittest.
Modified:
llvm/trunk/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp
Modified: llvm/trunk/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp?rev=231368&r1=231367&r2=231368&view=diff
==============================================================================
--- llvm/trunk/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp (original)
+++ llvm/trunk/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp Thu Mar 5 08:43:15 2015
@@ -97,7 +97,7 @@ TEST(DWARFFormValue, SignedConstantForms
// Check that we can handle big positive values, but that we return
// an error just over the limit.
auto UMax = createULEBFormValue(LLONG_MAX);
- auto TooBig = createULEBFormValue(LLONG_MAX + 1);
+ auto TooBig = createULEBFormValue(uint64_t(LLONG_MAX) + 1);
EXPECT_EQ(UMax.getAsSignedConstant().getValue(), LLONG_MAX);
EXPECT_EQ(TooBig.getAsSignedConstant().hasValue(), false);
More information about the llvm-commits
mailing list