diff --git a/clang/include/clang/Basic/OpenCLOptions.h b/clang/include/clang/Basic/OpenCLOptions.h --- a/clang/include/clang/Basic/OpenCLOptions.h +++ b/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 diff --git a/llvm/include/llvm/Testing/Support/Error.h b/llvm/include/llvm/Testing/Support/Error.h --- a/llvm/include/llvm/Testing/Support/Error.h +++ b/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 testing::Matcher Failed() { diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock.h b/llvm/utils/unittest/googlemock/include/gmock/gmock.h --- a/llvm/utils/unittest/googlemock/include/gmock/gmock.h +++ b/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_