[cfe-commits] r48460 - /cfe/trunk/lib/AST/CFG.cpp
Ted Kremenek
kremenek at apple.com
Mon Mar 17 10:19:44 PDT 2008
Author: kremenek
Date: Mon Mar 17 12:19:44 2008
New Revision: 48460
URL: http://llvm.org/viewvc/llvm-project?rev=48460&view=rev
Log:
Bug fix in CFG construction: VisitCompoundStmt should return the last created block.
Modified:
cfe/trunk/lib/AST/CFG.cpp
Modified: cfe/trunk/lib/AST/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CFG.cpp?rev=48460&r1=48459&r2=48460&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CFG.cpp (original)
+++ cfe/trunk/lib/AST/CFG.cpp Mon Mar 17 12:19:44 2008
@@ -475,13 +475,15 @@
}
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) {
More information about the cfe-commits
mailing list