From: Chandler Carruth Date: Wed, 27 Jan 2010 10:28:04 +0000 (+0000) Subject: Silence a GCC warning about uninitialized variables. The first user of this X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d883b5b3763605cd6850b49fd3b2613074e83a0;p=clang Silence a GCC warning about uninitialized variables. The first user of this showed up with a primitive type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94674 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/Support/Optional.h b/include/clang/Analysis/Support/Optional.h index b98d382700..a4e6d519a0 100644 --- a/include/clang/Analysis/Support/Optional.h +++ b/include/clang/Analysis/Support/Optional.h @@ -23,7 +23,7 @@ class Optional { T x; unsigned hasVal : 1; public: - explicit Optional() : hasVal(false) {} + explicit Optional() : x(), hasVal(false) {} Optional(const T &y) : x(y), hasVal(true) {} static inline Optional create(const T* y) {