diff --git a/third-party/benchmark/src/benchmark.cc b/third-party/benchmark/src/benchmark.cc index cedeee31c79e..473151136202 100644 --- a/third-party/benchmark/src/benchmark.cc +++ b/third-party/benchmark/src/benchmark.cc @@ -166,6 +166,9 @@ State::State(IterationCount max_iters, const std::vector& ranges, #elif defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Winvalid-offsetof" +#elif defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winvalid-offsetof" #endif // Offset tests to ensure commonly accessed data is on the first cache line. const int cache_line_size = 64; @@ -176,6 +179,8 @@ State::State(IterationCount max_iters, const std::vector& ranges, #pragma warning pop #elif defined(__GNUC__) #pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop #endif }