From a98a1a5c07144cb2bc331123c68f10289c143569 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 31 Jul 2019 23:37:24 +0000 Subject: [PATCH] Fix build when both gtest death tests and LLVM_NODISCARD are available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367495 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/ADT/APSIntTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unittests/ADT/APSIntTest.cpp b/unittests/ADT/APSIntTest.cpp index 1ad38716c77..9045f3e48f7 100644 --- a/unittests/ADT/APSIntTest.cpp +++ b/unittests/ADT/APSIntTest.cpp @@ -153,8 +153,8 @@ TEST(APSIntTest, FromString) { #if defined(GTEST_HAS_DEATH_TEST) && !defined(NDEBUG) TEST(APSIntTest, StringDeath) { - EXPECT_DEATH(APSInt(""), "Invalid string length"); - EXPECT_DEATH(APSInt("1a"), "Invalid character in digit string"); + EXPECT_DEATH((void)APSInt(""), "Invalid string length"); + EXPECT_DEATH((void)APSInt("1a"), "Invalid character in digit string"); } #endif -- 2.40.0