[PATCH] D101288: Only ignore -Wdeprecated-copy if the used compiler supports the warning
Mikael Holmén via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 26 23:32:58 PDT 2021
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG33f04e485c7d: Only ignore -Wdeprecated-copy if the used compiler supports the warning (authored by uabelho).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101288/new/
https://reviews.llvm.org/D101288
Files:
llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h
llvm/utils/unittest/googlemock/include/gmock/gmock.h
llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h
Index: llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h
===================================================================
--- llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h
+++ llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h
@@ -55,9 +55,11 @@
#if GTEST_HAS_PARAM_TEST
#ifdef __clang__
+#if __has_warning("-Wdeprecated-copy")
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#endif
+#endif
namespace testing {
@@ -5147,8 +5149,10 @@
} // namespace testing
#ifdef __clang__
+#if __has_warning("-Wdeprecated-copy")
#pragma clang diagnostic pop
#endif
+#endif
#endif // GTEST_HAS_PARAM_TEST
Index: llvm/utils/unittest/googlemock/include/gmock/gmock.h
===================================================================
--- llvm/utils/unittest/googlemock/include/gmock/gmock.h
+++ llvm/utils/unittest/googlemock/include/gmock/gmock.h
@@ -56,9 +56,11 @@
// where all clauses are optional and WillOnce() can be repeated.
#ifdef __clang__
+#if __has_warning("-Wdeprecated-copy")
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#endif
+#endif
#include "gmock/gmock-actions.h"
#include "gmock/gmock-cardinalities.h"
@@ -97,6 +99,8 @@
} // namespace testing
#ifdef __clang__
+#if __has_warning("-Wdeprecated-copy")
#pragma clang diagnostic pop
#endif
+#endif
#endif // GMOCK_INCLUDE_GMOCK_GMOCK_H_
Index: llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h
===================================================================
--- llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h
+++ llvm/utils/unittest/googlemock/include/gmock/gmock-matchers.h
@@ -59,9 +59,11 @@
#endif
#ifdef __clang__
+#if __has_warning("-Wdeprecated-copy")
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#endif
+#endif
namespace testing {
@@ -4422,8 +4424,10 @@
} // namespace testing
#ifdef __clang__
+#if __has_warning("-Wdeprecated-copy")
#pragma clang diagnostic pop
#endif
+#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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101288.340733.patch
Type: text/x-patch
Size: 2293 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210427/9b245bb7/attachment.bin>
More information about the llvm-commits
mailing list