[llvm] 09499ef - Add another -Wdeprecated-copy hack for gtest

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Fri May 14 11:37:36 PDT 2021


Author: Benjamin Kramer
Date: 2021-05-14T20:37:03+02:00
New Revision: 09499efb7a5805b56c126f6861b9de7b4f368863

URL: https://github.com/llvm/llvm-project/commit/09499efb7a5805b56c126f6861b9de7b4f368863
DIFF: https://github.com/llvm/llvm-project/commit/09499efb7a5805b56c126f6861b9de7b4f368863.diff

LOG: Add another -Wdeprecated-copy hack for gtest

Added: 
    

Modified: 
    llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h

Removed: 
    


################################################################################
diff  --git a/llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h
index 8cfc292e9b7c..0a997a298447 100644
--- a/llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h
+++ b/llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h
@@ -58,6 +58,13 @@
 # pragma warning(disable:4100)
 #endif
 
+#ifdef __clang__
+#if __has_warning("-Wdeprecated-copy")
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-copy"
+#endif
+#endif
+
 namespace testing {
 
 // To implement an action Foo, define:
@@ -1136,6 +1143,12 @@ inline ::std::reference_wrapper<T> ByRef(T& l_value) {  // NOLINT
 
 }  // namespace testing
 
+#ifdef __clang__
+#if __has_warning("-Wdeprecated-copy")
+#pragma clang diagnostic pop
+#endif
+#endif
+
 #ifdef _MSC_VER
 # pragma warning(pop)
 #endif


        


More information about the llvm-commits mailing list