[go: nahoru, domu]

Roll gtest and gmock DEPS.

These DEPS have not been updated for ~2 years, so there is a good chance
something will blow up. Due to interdependancy between the repos,
rolling gtest required gmock also be rolled.

This CL was originally landed as 288164 and reverted as 288239 because it allows
more aggressive LTO in MSVS. This resulted in the compiler noticing an
intentional arithmetic overflow and warning about it.

BUG=401761

Review URL: https://codereview.chromium.org/425333002

Cr-Commit-Position: refs/heads/master@{#288505}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288505 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/base/numerics/safe_numerics_unittest.cc b/base/numerics/safe_numerics_unittest.cc
index 09ad130..23c2c78 100644
--- a/base/numerics/safe_numerics_unittest.cc
+++ b/base/numerics/safe_numerics_unittest.cc
@@ -34,6 +34,13 @@
 #endif
 }
 
+// These tests deliberately cause arithmetic overflows. If the compiler is
+// aggressive enough, it can const fold these overflows. Disable warnings about
+// overflows for const expressions.
+#if defined(OS_WIN)
+#pragma warning(disable:4756)
+#endif
+
 // Helper macros to wrap displaying the conversion types and line numbers.
 #define TEST_EXPECTED_VALIDITY(expected, actual)                           \
   EXPECT_EQ(expected, CheckedNumeric<Dst>(actual).validity())              \