This is needed after
https://reviews.llvm.org/rG9658d045926545e62cc3f963fe611d7c5d0c9d98
which introduced code that at least didn't compile clean with clang 8.
Reviewed By: xbolva00
Differential Revision: https://reviews.llvm.org/D101288
# include <initializer_list> // NOLINT -- must be after gtest.h
#endif
-#ifdef __clang__
+#if defined(__clang__) && __has_warning("-Wdeprecated-copy")
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#endif
} // namespace testing
-#ifdef __clang__
+#if defined(__clang__) && __has_warning("-Wdeprecated-copy")
#pragma clang diagnostic pop
#endif
//
// where all clauses are optional and WillOnce() can be repeated.
-#ifdef __clang__
+#if defined(__clang__) && __has_warning("-Wdeprecated-copy")
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#endif
} // namespace testing
-#ifdef __clang__
+#if defined(__clang__) && __has_warning("-Wdeprecated-copy")
#pragma clang diagnostic pop
#endif
#endif // GMOCK_INCLUDE_GMOCK_GMOCK_H_
#if GTEST_HAS_PARAM_TEST
-#ifdef __clang__
+#if defined(__clang__) && __has_warning("-Wdeprecated-copy")
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy"
#endif
} // namespace internal
} // namespace testing
-#ifdef __clang__
+#if defined(__clang__) && __has_warning("-Wdeprecated-copy")
#pragma clang diagnostic pop
#endif