summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-09-16 03:28:18 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-09-16 03:28:18 +0000
commitd38fb8466cc672381611ab7c6de7776ea350055b (patch)
tree5b23e7f4f7862cc2a41f008f811367cc7025d312 /clang/lib/Analysis
parent2a8b9a3caa93b1b40782adfd827b581f9ab19a74 (diff)
downloadbcm5719-llvm-d38fb8466cc672381611ab7c6de7776ea350055b.tar.gz
bcm5719-llvm-d38fb8466cc672381611ab7c6de7776ea350055b.zip
Tidy up.
llvm-svn: 114062
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r--clang/lib/Analysis/CFG.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp
index 963d45dd98f..d9a375fc020 100644
--- a/clang/lib/Analysis/CFG.cpp
+++ b/clang/lib/Analysis/CFG.cpp
@@ -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;
OpenPOWER on IntegriCloud