[cfe-commits] r48392 - /cfe/trunk/AST/CFG.cpp
Ted Kremenek
kremenek at apple.com
Sat Mar 15 00:45:03 PDT 2008
Author: kremenek
Date: Sat Mar 15 02:45:02 2008
New Revision: 48392
URL: http://llvm.org/viewvc/llvm-project?rev=48392&view=rev
Log:
Small bug fix in CFG construction: the active block for LabelStmts comes
from "Block", not the CFGBlock* returned from visiting its subexpression.
Modified:
cfe/trunk/AST/CFG.cpp
Modified: cfe/trunk/AST/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/CFG.cpp?rev=48392&r1=48391&r2=48392&view=diff
==============================================================================
--- cfe/trunk/AST/CFG.cpp (original)
+++ cfe/trunk/AST/CFG.cpp Sat Mar 15 02:45:02 2008
@@ -577,7 +577,8 @@
CFGBlock* CFGBuilder::VisitLabelStmt(LabelStmt* L) {
// Get the block of the labeled statement. Add it to our map.
- CFGBlock* LabelBlock = Visit(L->getSubStmt());
+ Visit(L->getSubStmt());
+ CFGBlock* LabelBlock = Block;
if (!LabelBlock) // This can happen when the body is empty, i.e.
LabelBlock=createBlock(); // scopes that only contains NullStmts.
@@ -970,7 +971,7 @@
// This block is now the implicit successor of other blocks.
Succ = CaseBlock;
- return CaseBlock;
+ return CaseBlock;
}
CFGBlock* CFGBuilder::VisitDefaultStmt(DefaultStmt* S) {
More information about the cfe-commits
mailing list