[llvm] r367899 - Fix build when both gtest death tests and LLVM_NODISCARD are available.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 11:12:50 PDT 2019
Author: dblaikie
Date: Mon Aug 5 11:12:50 2019
New Revision: 367899
URL: http://llvm.org/viewvc/llvm-project?rev=367899&view=rev
Log:
Fix build when both gtest death tests and LLVM_NODISCARD are available.
(matching r367495)
Modified:
llvm/trunk/unittests/ADT/APIntTest.cpp
Modified: llvm/trunk/unittests/ADT/APIntTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/APIntTest.cpp?rev=367899&r1=367898&r2=367899&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/APIntTest.cpp (original)
+++ llvm/trunk/unittests/ADT/APIntTest.cpp Mon Aug 5 11:12:50 2019
@@ -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
More information about the llvm-commits
mailing list