diff options
Diffstat (limited to 'googlemock')
| -rw-r--r-- | googlemock/include/gmock/gmock-cardinalities.h | 5 | ||||
| -rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 5 | ||||
| -rw-r--r-- | googlemock/include/gmock/gmock-spec-builders.h | 15 | 
3 files changed, 17 insertions, 8 deletions
diff --git a/googlemock/include/gmock/gmock-cardinalities.h b/googlemock/include/gmock/gmock-cardinalities.h index bf3ae557..f9169315 100644 --- a/googlemock/include/gmock/gmock-cardinalities.h +++ b/googlemock/include/gmock/gmock-cardinalities.h @@ -44,6 +44,9 @@  #include "gmock/internal/gmock-port.h"  #include "gtest/gtest.h" +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) +  namespace testing {  // To implement a cardinality Foo, define: @@ -145,4 +148,6 @@ inline Cardinality MakeCardinality(const CardinalityInterface* c) {  }  // namespace testing +GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251 +  #endif  // GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index a0018505..3336eff2 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -56,6 +56,9 @@  # include <initializer_list>  // NOLINT -- must be after gtest.h  #endif +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) +  namespace testing {  // To implement a matcher Foo for type T, define: @@ -5266,6 +5269,8 @@ PolymorphicMatcher<internal::variant_matcher::VariantMatcher<T> > VariantWith(  }  // namespace testing +GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251 +  // Include any custom callback matchers added by the local installation.  // We must include this header at the end to make sure it can use the  // declarations from this file. 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 <stdexcept>  // 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<T&> {  // 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  | 
