diff options
author | Abseil Team <absl-team@google.com> | 2021-02-09 00:00:11 (GMT) |
---|---|---|
committer | Andy Soffer <asoffer@google.com> | 2021-02-11 17:48:52 (GMT) |
commit | 9c2293af064504f1a7296a2397211be8809452d9 (patch) | |
tree | 817dafad487495de81d95df5951f4e30d9b971b3 /googlemock/include/gmock | |
parent | 36b7792047b8dc92a4b749e6e188f1cca3a232c9 (diff) | |
download | googletest-9c2293af064504f1a7296a2397211be8809452d9.zip googletest-9c2293af064504f1a7296a2397211be8809452d9.tar.gz googletest-9c2293af064504f1a7296a2397211be8809452d9.tar.bz2 |
Googletest export
Fix build for MinGW + clang
In [1], empty_bases "is only supported when using the Microsoft C++ ABI." Disable it for MinGW.
https://clang.llvm.org/docs/AttributeReference.html#empty-bases
PiperOrigin-RevId: 356373782
Diffstat (limited to 'googlemock/include/gmock')
-rw-r--r-- | googlemock/include/gmock/gmock-nice-strict.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/googlemock/include/gmock/gmock-nice-strict.h b/googlemock/include/gmock/gmock-nice-strict.h index 75c51dd..bf02092 100644 --- a/googlemock/include/gmock/gmock-nice-strict.h +++ b/googlemock/include/gmock/gmock-nice-strict.h @@ -97,7 +97,8 @@ constexpr bool HasStrictnessModifier() { // deregistration. This guarantees that MockClass's constructor and destructor // run with the same level of strictness as its instance methods. -#if GTEST_OS_WINDOWS && (defined(_MSC_VER) || defined(__clang__)) +#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW && \ + (defined(_MSC_VER) || defined(__clang__)) // We need to mark these classes with this declspec to ensure that // the empty base class optimization is performed. #define GTEST_INTERNAL_EMPTY_BASE_CLASS __declspec(empty_bases) |