From 942d2e19e11d6d65bf147ecab8513b7e8bd5d7e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?D=C3=A1vid=20Bolvansk=C3=BD?= Date: Mon, 26 Apr 2021 16:08:18 +0200 Subject: [PATCH] Revert "Only ignore -Wdeprecated-copy if the used compiler supports the warning" This reverts commit b125c034af89e32d5258d593080ff0c4810776a0. Some bots say " missing binary operator before token "(" " --- llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h | 4 ++-- llvm/utils/unittest/googlemock/include/gmock/gmock.h | 4 ++-- .../googletest/include/gtest/internal/gtest-param-util-generated.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h index ee2b4e4..b387c17 100644 --- a/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h +++ b/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h @@ -58,7 +58,7 @@ # include // NOLINT -- must be after gtest.h #endif -#if defined(__clang__) && __has_warning("-Wdeprecated-copy") +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy" #endif @@ -4421,7 +4421,7 @@ inline InnerMatcher AllArgs(const InnerMatcher& matcher) { return matcher; } } // namespace testing -#if defined(__clang__) && __has_warning("-Wdeprecated-copy") +#ifdef __clang__ #pragma clang diagnostic pop #endif diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock.h b/llvm/utils/unittest/googlemock/include/gmock/gmock.h index 68aba63..8acc461 100644 --- a/llvm/utils/unittest/googlemock/include/gmock/gmock.h +++ b/llvm/utils/unittest/googlemock/include/gmock/gmock.h @@ -55,7 +55,7 @@ // // where all clauses are optional and WillOnce() can be repeated. -#if defined(__clang__) && __has_warning("-Wdeprecated-copy") +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy" #endif @@ -96,7 +96,7 @@ GTEST_API_ void InitGoogleMock(int* argc, wchar_t** argv); } // namespace testing -#if defined(__clang__) && __has_warning("-Wdeprecated-copy") +#ifdef __clang__ #pragma clang diagnostic pop #endif #endif // GMOCK_INCLUDE_GMOCK_GMOCK_H_ diff --git a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h index e67f7b4..df5f143 100644 --- a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h +++ b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h @@ -54,7 +54,7 @@ #if GTEST_HAS_PARAM_TEST -#if defined(__clang__) && __has_warning("-Wdeprecated-copy") +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-copy" #endif @@ -5146,7 +5146,7 @@ CartesianProductHolder10(const Generator1& g1, const Generator2& g2, } // namespace internal } // namespace testing -#if defined(__clang__) && __has_warning("-Wdeprecated-copy") +#ifdef __clang__ #pragma clang diagnostic pop #endif -- 2.7.4