Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2717)

Unified Diff: base/time/time.h

Issue 2104893004: Work around /analyze internal compiler error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time.h
diff --git a/base/time/time.h b/base/time/time.h
index d51cf485694ac2256d59b27d87e520acdd898171..efece969b0211b3d3b9f95d8e8ba2437b210798a 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -667,7 +667,13 @@ constexpr TimeDelta TimeDelta::FromDouble(double value) {
// static
constexpr TimeDelta TimeDelta::FromProduct(int64_t value,
int64_t positive_value) {
- return (DCHECK(positive_value > 0),
+ return (
+#if !defined(_PREFAST_) || !defined(OS_WIN)
dcheng 2016/06/29 08:07:48 Are there non-Windows builds that define _PREFAST_
brucedawson 2016/06/29 17:47:18 I check OS_WIN for consistency with other places t
+ // Avoid internal compiler errors in /analyze builds with VS 2015
+ // update 3.
+ // https://connect.microsoft.com/VisualStudio/feedback/details/2870865
+ DCHECK(positive_value > 0),
+#endif
value > std::numeric_limits<int64_t>::max() / positive_value
? Max()
: value < -std::numeric_limits<int64_t>::max() / positive_value
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698