From 5f49ee871790cd9cf952c69d91d1087e8c5a4ff3 Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Tue, 1 Dec 2015 12:04:24 -0800 Subject: [PATCH] Avoid requiring a suppression (unevaluated-expression) Summary: [Folly] Avoid requiring a suppression (`unevaluated-expression`). I am not a fan of suppressing warnings. This warning comes from the internals of gtest, but anyway. Replace with something that does not trigger the warning. Reviewed By: Gownta Differential Revision: D2706279 fb-gh-sync-id: 2ecac1d230308a8fd21a69565193c52585526448 --- folly/test/ExceptionWrapperTest.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/folly/test/ExceptionWrapperTest.cpp b/folly/test/ExceptionWrapperTest.cpp index 74e2d0d3..71a91599 100644 --- a/folly/test/ExceptionWrapperTest.cpp +++ b/folly/test/ExceptionWrapperTest.cpp @@ -177,14 +177,7 @@ TEST(ExceptionWrapper, with_exception_test) { EXPECT_EQ(ew2.class_name(), "IntException"); ew2.with_exception([&](AbstractIntException& ie) { EXPECT_EQ(ie.getInt(), expected); -#if __CLANG_PREREQ(3, 6) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wunevaluated-expression" -#endif - EXPECT_EQ(typeid(ie), typeid(IntException)); -#if __CLANG_PREREQ(3, 6) -# pragma clang diagnostic pop -#endif + EXPECT_TRUE(dynamic_cast(&ie)); }); // Test with const this. If this compiles and does not crash due to -- 2.34.1