nemanjai created this revision.
nemanjai added reviewers: xbolva00, rsmith.
nemanjai requested review of this revision.
Herald added projects: clang, LLVM.
Herald added a subscriber: llvm-commits.

Bootstrap with `-Werror` is currently broken due to 
https://reviews.llvm.org/D79714.
This patch is required to bring the bootstrap bot back to green. The code will 
likely need to be fixed and the pragmas removed in due time, but for now we 
need to bring the bot back up.

Bot that is currently failing:
https://lab.llvm.org/buildbot/#/builders/36/builds/7680


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101214

Files:
  clang/include/clang/Basic/OpenCLOptions.h
  llvm/include/llvm/Testing/Support/Error.h
  llvm/utils/unittest/googlemock/include/gmock/gmock.h


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
@@ -55,6 +55,11 @@
 //
 // where all clauses are optional and WillOnce() can be repeated.
 
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-copy"
+#endif
+
 #include "gmock/gmock-actions.h"
 #include "gmock/gmock-cardinalities.h"
 #include "gmock/gmock-generated-actions.h"
@@ -91,4 +96,7 @@
 
 }  // namespace testing
 
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
 #endif  // GMOCK_INCLUDE_GMOCK_GMOCK_H_
Index: llvm/include/llvm/Testing/Support/Error.h
===================================================================
--- llvm/include/llvm/Testing/Support/Error.h
+++ llvm/include/llvm/Testing/Support/Error.h
@@ -170,8 +170,16 @@
 #define ASSERT_THAT_EXPECTED(Err, Matcher)                                     
\
   ASSERT_THAT(llvm::detail::TakeExpected(Err), Matcher)
 
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-copy"
+#endif
+
 MATCHER(Succeeded, "") { return arg.Success(); }
 MATCHER(Failed, "") { return !arg.Success(); }
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
 
 template <typename InfoT>
 testing::Matcher<const detail::ErrorHolder &> Failed() {
Index: clang/include/clang/Basic/OpenCLOptions.h
===================================================================
--- clang/include/clang/Basic/OpenCLOptions.h
+++ clang/include/clang/Basic/OpenCLOptions.h
@@ -61,6 +61,11 @@
 }
 } // end anonymous namespace
 
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-copy"
+#endif
+
 /// OpenCL supported extensions and optional core features
 class OpenCLOptions {
 public:
@@ -175,6 +180,10 @@
   OpenCLOptionInfoMap OptMap;
 };
 
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
 } // end namespace clang
 
 #endif


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
@@ -55,6 +55,11 @@
 //
 // where all clauses are optional and WillOnce() can be repeated.
 
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-copy"
+#endif
+
 #include "gmock/gmock-actions.h"
 #include "gmock/gmock-cardinalities.h"
 #include "gmock/gmock-generated-actions.h"
@@ -91,4 +96,7 @@
 
 }  // namespace testing
 
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
 #endif  // GMOCK_INCLUDE_GMOCK_GMOCK_H_
Index: llvm/include/llvm/Testing/Support/Error.h
===================================================================
--- llvm/include/llvm/Testing/Support/Error.h
+++ llvm/include/llvm/Testing/Support/Error.h
@@ -170,8 +170,16 @@
 #define ASSERT_THAT_EXPECTED(Err, Matcher)                                     \
   ASSERT_THAT(llvm::detail::TakeExpected(Err), Matcher)
 
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-copy"
+#endif
+
 MATCHER(Succeeded, "") { return arg.Success(); }
 MATCHER(Failed, "") { return !arg.Success(); }
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
 
 template <typename InfoT>
 testing::Matcher<const detail::ErrorHolder &> Failed() {
Index: clang/include/clang/Basic/OpenCLOptions.h
===================================================================
--- clang/include/clang/Basic/OpenCLOptions.h
+++ clang/include/clang/Basic/OpenCLOptions.h
@@ -61,6 +61,11 @@
 }
 } // end anonymous namespace
 
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-copy"
+#endif
+
 /// OpenCL supported extensions and optional core features
 class OpenCLOptions {
 public:
@@ -175,6 +180,10 @@
   OpenCLOptionInfoMap OptMap;
 };
 
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
 } // end namespace clang
 
 #endif
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D101214: Disable ... Nemanja Ivanovic via Phabricator via cfe-commits

Reply via email to