aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFG.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-08-17 21:04:19 +0000
committerTed Kremenek <kremenek@apple.com>2011-08-17 21:04:19 +0000
commit012614ecf78442368ec82ee30efb3bc047b413e6 (patch)
treef773bf609bcda2b21130c3db4b4dddced1a696e0 /lib/Analysis/CFG.cpp
parent38ca02ed9495a3c708fafc7d8b7d87a8cfcfe8f3 (diff)
Fix a handful of dead stores found by Clang's static analyzer. There's a bunch of others I haven't touched.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFG.cpp')
-rw-r--r--lib/Analysis/CFG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp
index 31a2931e1c..a1997ab6a9 100644
--- a/lib/Analysis/CFG.cpp
+++ b/lib/Analysis/CFG.cpp
@@ -1807,7 +1807,6 @@ CFGBlock *CFGBuilder::VisitObjCForCollectionStmt(ObjCForCollectionStmt *S) {
// Build the condition blocks.
CFGBlock *ExitConditionBlock = createBlock(false);
- CFGBlock *EntryConditionBlock = ExitConditionBlock;
// Set the terminator for the "exit" condition block.
ExitConditionBlock->setTerminator(S);
@@ -1821,7 +1820,8 @@ CFGBlock *CFGBuilder::VisitObjCForCollectionStmt(ObjCForCollectionStmt *S) {
// Walk the 'element' expression to see if there are any side-effects. We
// generate new blocks as necessary. We DON'T add the statement by default to
// the CFG unless it contains control-flow.
- EntryConditionBlock = Visit(S->getElement(), AddStmtChoice::NotAlwaysAdd);
+ CFGBlock *EntryConditionBlock = Visit(S->getElement(),
+ AddStmtChoice::NotAlwaysAdd);
if (Block) {
if (badCFG)
return 0;