Work around a bogus warning on MSVC.
authorZachary Turner <zturner@google.com>
Thu, 8 Dec 2016 00:54:24 +0000 (00:54 +0000)
committerZachary Turner <zturner@google.com>
Thu, 8 Dec 2016 00:54:24 +0000 (00:54 +0000)
llvm-svn: 289009

lldb/include/lldb/Target/Target.h

index 5588bdc..8d6fc77 100644 (file)
@@ -225,7 +225,19 @@ private:
 
 class EvaluateExpressionOptions {
 public:
+// MSVC has a bug here that reports C4268: 'const' static/global data
+// initialized with compiler generated default constructor fills the object
+// with zeros.
+// Confirmed that MSVC is *not* zero-initializing, it's just a bogus warning.
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable : 4268)
+#endif
   static constexpr std::chrono::milliseconds default_timeout{500};
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
+
   static constexpr ExecutionPolicy default_execution_policy =
       eExecutionPolicyOnlyWhenNeeded;