From ddee175f37fc910068270a80f24804a1b16095a1 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 5 Aug 2019 18:12:50 +0000 Subject: [PATCH] Fix build when both gtest death tests and LLVM_NODISCARD are available. (matching r367495) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367899 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/ADT/APIntTest.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/unittests/ADT/APIntTest.cpp b/unittests/ADT/APIntTest.cpp index 4c576eab200..ce511ce06f3 100644 --- a/unittests/ADT/APIntTest.cpp +++ b/unittests/ADT/APIntTest.cpp @@ -1390,15 +1390,15 @@ TEST(APIntTest, magicu) { #ifdef GTEST_HAS_DEATH_TEST #ifndef NDEBUG TEST(APIntTest, StringDeath) { - EXPECT_DEATH(APInt(0, "", 0), "Bitwidth too small"); - EXPECT_DEATH(APInt(32, "", 0), "Invalid string length"); - EXPECT_DEATH(APInt(32, "0", 0), "Radix should be 2, 8, 10, 16, or 36!"); - EXPECT_DEATH(APInt(32, "", 10), "Invalid string length"); - EXPECT_DEATH(APInt(32, "-", 10), "String is only a sign, needs a value."); - EXPECT_DEATH(APInt(1, "1234", 10), "Insufficient bit width"); - EXPECT_DEATH(APInt(32, "\0", 10), "Invalid string length"); - EXPECT_DEATH(APInt(32, StringRef("1\02", 3), 10), "Invalid character in digit string"); - EXPECT_DEATH(APInt(32, "1L", 10), "Invalid character in digit string"); + EXPECT_DEATH((void)APInt(0, "", 0), "Bitwidth too small"); + EXPECT_DEATH((void)APInt(32, "", 0), "Invalid string length"); + EXPECT_DEATH((void)APInt(32, "0", 0), "Radix should be 2, 8, 10, 16, or 36!"); + EXPECT_DEATH((void)APInt(32, "", 10), "Invalid string length"); + EXPECT_DEATH((void)APInt(32, "-", 10), "String is only a sign, needs a value."); + EXPECT_DEATH((void)APInt(1, "1234", 10), "Insufficient bit width"); + EXPECT_DEATH((void)APInt(32, "\0", 10), "Invalid string length"); + EXPECT_DEATH((void)APInt(32, StringRef("1\02", 3), 10), "Invalid character in digit string"); + EXPECT_DEATH((void)APInt(32, "1L", 10), "Invalid character in digit string"); } #endif #endif -- 2.40.0