[llvm] 9658d04 - [utils] Disable -Wdeprecated-copy for googlemock/gtest
Dávid Bolvanský via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 23 14:46:08 PDT 2021
Author: Dávid Bolvanský
Date: 2021-04-23T23:45:50+02:00
New Revision: 9658d045926545e62cc3f963fe611d7c5d0c9d98
URL: https://github.com/llvm/llvm-project/commit/9658d045926545e62cc3f963fe611d7c5d0c9d98
DIFF: https://github.com/llvm/llvm-project/commit/9658d045926545e62cc3f963fe611d7c5d0c9d98.diff
LOG: [utils] Disable -Wdeprecated-copy for googlemock/gtest
Simple fix for build breakage. Feel free to fix all places (quite a lot).
Added:
Modified:
llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h
llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h
Removed:
################################################################################
diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h
index 755dbb9cdedb..b387c178fcc1 100644
--- a/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h
+++ b/llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h
@@ -58,6 +58,11 @@
# include <initializer_list> // NOLINT -- must be after gtest.h
#endif
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-copy"
+#endif
+
namespace testing {
// To implement a matcher Foo for type T, define:
@@ -4416,6 +4421,10 @@ inline InnerMatcher AllArgs(const InnerMatcher& matcher) { return matcher; }
} // namespace testing
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
// Include any custom callback matchers added by the local installation.
// We must include this header at the end to make sure it can use the
// declarations from this file.
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 f6b8429e410f..df5f143604bb 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,6 +54,11 @@
#if GTEST_HAS_PARAM_TEST
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-copy"
+#endif
+
namespace testing {
// Forward declarations of ValuesIn(), which is implemented in
@@ -5141,6 +5146,10 @@ CartesianProductHolder10(const Generator1& g1, const Generator2& g2,
} // namespace internal
} // namespace testing
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
#endif // GTEST_HAS_PARAM_TEST
#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
More information about the llvm-commits
mailing list