]> granicus.if.org Git - clang/commitdiff
clangAnalysis: Avoid member initializers in TempDtorContext to appease msc17.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 8 Aug 2014 09:51:07 +0000 (09:51 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 8 Aug 2014 09:51:07 +0000 (09:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215193 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CFG.cpp

index 49f35ef10f1afab595960133688d33a6f2778b28..4a0d4e8e467b9f6280793c5b9d92bc9c83d08de4 100644 (file)
@@ -445,10 +445,13 @@ private:
   ///     if the CXXBindTemporaryExpr was marked executed, and otherwise
   ///     branches to the stored successor.
   struct TempDtorContext {
-    TempDtorContext() : KnownExecuted(true) {}
+    TempDtorContext()
+        : IsConditional(false), KnownExecuted(true), Succ(nullptr),
+          TerminatorExpr(nullptr) {}
 
     TempDtorContext(TryResult KnownExecuted)
-        : IsConditional(true), KnownExecuted(KnownExecuted) {}
+        : IsConditional(true), KnownExecuted(KnownExecuted), Succ(nullptr),
+          TerminatorExpr(nullptr) {}
 
     /// Returns whether we need to start a new branch for a temporary destructor
     /// call. This is the case when the the temporary destructor is
@@ -467,10 +470,10 @@ private:
       TerminatorExpr = E;
     }
 
-    const bool IsConditional = false;
+    const bool IsConditional;
     const TryResult KnownExecuted;
-    CFGBlock *Succ = nullptr;
-    CXXBindTemporaryExpr *TerminatorExpr = nullptr;
+    CFGBlock *Succ;
+    CXXBindTemporaryExpr *TerminatorExpr;
   };
 
   // Visitors to walk an AST and generate destructors of temporaries in