[llvm] r300773 - [APInt] Cast more calls to add/sub/mul overflow functions to void. I missed the unittests in r300758.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 15:11:05 PDT 2017


Author: ctopper
Date: Wed Apr 19 17:11:05 2017
New Revision: 300773

URL: http://llvm.org/viewvc/llvm-project?rev=300773&view=rev
Log:
[APInt] Cast more calls to add/sub/mul overflow functions to void. I missed the unittests in r300758.

Modified:
    llvm/trunk/unittests/IR/ConstantRangeTest.cpp

Modified: llvm/trunk/unittests/IR/ConstantRangeTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/ConstantRangeTest.cpp?rev=300773&r1=300772&r2=300773&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/ConstantRangeTest.cpp (original)
+++ llvm/trunk/unittests/IR/ConstantRangeTest.cpp Wed Apr 19 17:11:05 2017
@@ -670,14 +670,14 @@ TEST(ConstantRange, MakeGuaranteedNoWrap
     for (APInt I = NUWRegion.getLower(), E = NUWRegion.getUpper(); I != E;
          ++I) {
       bool Overflow = false;
-      I.uadd_ov(C, Overflow);
+      (void)I.uadd_ov(C, Overflow);
       EXPECT_FALSE(Overflow);
     }
 
     for (APInt I = NSWRegion.getLower(), E = NSWRegion.getUpper(); I != E;
          ++I) {
       bool Overflow = false;
-      I.sadd_ov(C, Overflow);
+      (void)I.sadd_ov(C, Overflow);
       EXPECT_FALSE(Overflow);
     }
 
@@ -685,10 +685,10 @@ TEST(ConstantRange, MakeGuaranteedNoWrap
          ++I) {
       bool Overflow = false;
 
-      I.sadd_ov(C, Overflow);
+      (void)I.sadd_ov(C, Overflow);
       EXPECT_FALSE(Overflow);
 
-      I.uadd_ov(C, Overflow);
+      (void)I.uadd_ov(C, Overflow);
       EXPECT_FALSE(Overflow);
     }
   }




More information about the llvm-commits mailing list