]> granicus.if.org Git - clang/commitdiff
Tidy up.
authorZhongxing Xu <xuzhongxing@gmail.com>
Thu, 16 Sep 2010 03:28:18 +0000 (03:28 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Thu, 16 Sep 2010 03:28:18 +0000 (03:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114062 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CFG.cpp

index 963d45dd98fe05c62a787a1751324f812f1e8e8b..d9a375fc020e90e12db995edf3ccbd295a7fa5c1 100644 (file)
@@ -91,12 +91,15 @@ class CFGBuilder {
   typedef llvm::SmallPtrSet<LabelStmt*,5> LabelSetTy;
   LabelSetTy AddressTakenLabels;
 
+  bool badCFG;
+  CFG::BuildOptions BuildOpts;
+
 public:
   explicit CFGBuilder() : cfg(new CFG()), // crew a new CFG
                           Block(NULL), Succ(NULL),
                           ContinueTargetBlock(NULL), BreakTargetBlock(NULL),
                           SwitchTerminatedBlock(NULL), DefaultCaseBlock(NULL),
-                          TryTerminatedBlock(NULL) {}
+                          TryTerminatedBlock(NULL), badCFG(false) {}
 
   // buildCFG - Used by external clients to construct the CFG.
   CFG* buildCFG(const Decl *D, Stmt *Statement, ASTContext *C,
@@ -197,9 +200,6 @@ private:
 
     return TryResult();
   }
-
-  bool badCFG;
-  CFG::BuildOptions BuildOpts;
 };
 
 // FIXME: Add support for dependent-sized array types in C++?
@@ -229,7 +229,6 @@ CFG* CFGBuilder::buildCFG(const Decl *D, Stmt* Statement, ASTContext* C,
   if (!Statement)
     return NULL;
 
-  badCFG = false;
   BuildOpts = BO;
   if (!C->getLangOptions().CPlusPlus)
     BuildOpts.AddImplicitDtors = false;