Fix clang-cl warnings on gtest_and_gmock
On clang-cl on windows, __GNUC__ is not defined, but __clang__ is.
Change-Id: I43fb6286f4527712de0f4ac5a19080b53885575b
diff --git a/test/gtest_and_gmock.h b/test/gtest_and_gmock.h
index 82918d8..710d07d 100644
--- a/test/gtest_and_gmock.h
+++ b/test/gtest_and_gmock.h
@@ -27,14 +27,14 @@
#include "perfetto/base/build_config.h"
-#if defined(__GNUC__) // GCC & clang
+#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wundef"
#pragma GCC diagnostic ignored "-Wdeprecated"
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wfloat-equal"
-#endif // __GNUC__
+#endif // defined(__GNUC__) || defined(__clang__)
#if defined(__clang__)
#pragma GCC diagnostic ignored "-Wshift-sign-overflow"
@@ -44,12 +44,12 @@
#pragma GCC diagnostic ignored "-Wcomma"
#endif // PERFETTO_OS_NACL
-#endif
+#endif // defined(__clang__)
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-#if defined(__GNUC__)
+#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic pop
#endif