aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/CFG.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/CFG.cpp')
-rw-r--r--lib/AST/CFG.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/AST/CFG.cpp b/lib/AST/CFG.cpp
index e2aba6b3ff..d8c5f1ce69 100644
--- a/lib/AST/CFG.cpp
+++ b/lib/AST/CFG.cpp
@@ -475,13 +475,15 @@ CFGBlock* CFGBuilder::VisitNullStmt(NullStmt* Statement) {
}
CFGBlock* CFGBuilder::VisitCompoundStmt(CompoundStmt* C) {
+
+ CFGBlock* LastBlock = NULL;
for (CompoundStmt::reverse_body_iterator I=C->body_rbegin(), E=C->body_rend();
I != E; ++I ) {
- Visit(*I);
+ LastBlock = Visit(*I);
}
- return Block;
+ return LastBlock;
}
CFGBlock* CFGBuilder::VisitIfStmt(IfStmt* I) {