]> granicus.if.org Git - clang/commitdiff
Silence a GCC warning about uninitialized variables. The first user of this
authorChandler Carruth <chandlerc@gmail.com>
Wed, 27 Jan 2010 10:28:04 +0000 (10:28 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 27 Jan 2010 10:28:04 +0000 (10:28 +0000)
showed up with a primitive type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94674 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/Support/Optional.h

index b98d382700add80f4e6afcd0e0037d06a1a9425f..a4e6d519a04f8fe1f8599d8d3a8caeb0b06c100a 100644 (file)
@@ -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) {