From df428ec11891f12c81e2872c0432e342b5403a34 Mon Sep 17 00:00:00 2001 From: misterg Date: Mon, 20 Aug 2018 14:48:45 -0400 Subject: googletest export - 209457654 Import of OSS PR, https://github.com/google/googletest/pu... by misterg PiperOrigin-RevId: 209457654 --- googlemock/include/gmock/gmock-spec-builders.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'googlemock/include/gmock/gmock-spec-builders.h') diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h index 0d83cd6f..436e2d8b 100644 --- a/googlemock/include/gmock/gmock-spec-builders.h +++ b/googlemock/include/gmock/gmock-spec-builders.h @@ -77,6 +77,9 @@ # include // NOLINT #endif +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + namespace testing { // An abstract handle of an expectation. @@ -1357,11 +1360,7 @@ class ReferenceOrValueWrapper { // we need to temporarily disable the warning. We have to do it for // the entire class to suppress the warning, even though it's about // the constructor only. - -#ifdef _MSC_VER -# pragma warning(push) // Saves the current warning state. -# pragma warning(disable:4355) // Temporarily disables warning 4355. -#endif // _MSV_VER +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4355) // C++ treats the void type specially. For example, you cannot define // a void-typed variable or pass a void value to a function. @@ -1797,9 +1796,7 @@ class FunctionMockerBase : public UntypedFunctionMockerBase { GTEST_DISALLOW_COPY_AND_ASSIGN_(FunctionMockerBase); }; // class FunctionMockerBase -#ifdef _MSC_VER -# pragma warning(pop) // Restores the warning state. -#endif // _MSV_VER +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4355 // Implements methods of FunctionMockerBase. @@ -1844,6 +1841,8 @@ inline Expectation::Expectation(internal::ExpectationBase& exp) // NOLINT } // namespace testing +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + // Implementation for ON_CALL and EXPECT_CALL macros. A separate macro is // required to avoid compile errors when the name of the method used in call is // a result of macro expansion. See CompilesWithMethodNameExpandedFromMacro -- cgit v1.2.3