summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-07-03 00:10:50 +0000
committerTed Kremenek <kremenek@apple.com>2009-07-03 00:10:50 +0000
commit0b0f206efa8b09a5e38f601786f4cadbde1954ec (patch)
treeb1d1c6950e5b0fcfa443867300da1d0b67667e0b /clang/lib
parent38a22bffdc863f8680f17cb31874af3cf4ce67c2 (diff)
downloadbcm5719-llvm-0b0f206efa8b09a5e38f601786f4cadbde1954ec.tar.gz
bcm5719-llvm-0b0f206efa8b09a5e38f601786f4cadbde1954ec.zip
Fix a horrible CFG bug reported in <rdar://problem/7027684>. The wrong successor
block would get hooked up in some cases when processing empty compound statements. llvm-svn: 74743
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/CFG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/CFG.cpp b/clang/lib/AST/CFG.cpp
index d3087c2f87d..69852f5fea5 100644
--- a/clang/lib/AST/CFG.cpp
+++ b/clang/lib/AST/CFG.cpp
@@ -556,7 +556,7 @@ CFGBlock* CFGBuilder::VisitNullStmt(NullStmt* Statement) {
CFGBlock* CFGBuilder::VisitCompoundStmt(CompoundStmt* C) {
- CFGBlock* LastBlock = NULL;
+ CFGBlock* LastBlock = Block;
for (CompoundStmt::reverse_body_iterator I=C->body_rbegin(), E=C->body_rend();
I != E; ++I ) {
OpenPOWER on IntegriCloud