From 79dc0f231a5fc191c90910615572c737c9d688ee Mon Sep 17 00:00:00 2001 From: dmauro Date: Wed, 14 Oct 2020 10:37:22 -0400 Subject: [PATCH] Googletest export Disable -Wmismatched-tags warning for struct/class tuple_size PiperOrigin-RevId: 337087493 --- .../include/gtest/internal/gtest-internal.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h index 738e6c3a..959f6fcf 100644 --- a/googletest/include/gtest/internal/gtest-internal.h +++ b/googletest/include/gtest/internal/gtest-internal.h @@ -1323,11 +1323,19 @@ constexpr bool InstantiateTypedTestCase_P_IsDeprecated() { return true; } } // namespace testing namespace std { - +// Some standard library implementations use `struct tuple_size` and some use +// `class tuple_size`. Clang warns about the mismatch. +// https://reviews.llvm.org/D55466 +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wmismatched-tags" +#endif template -class tuple_size> - : public std::integral_constant {}; - +struct tuple_size> + : std::integral_constant {}; +#ifdef __clang__ +#pragma clang diagnostic pop +#endif } // namespace std #define GTEST_MESSAGE_AT_(file, line, message, result_type) \