CFGBlock* BodyBlock = Visit(F->getBody());
if (!BodyBlock)
- BodyBlock = ExitConditionBlock; // can happen for "for (...;...; ) ;"
+ BodyBlock = EntryConditionBlock; // can happen for "for (...;...; ) ;"
else if (Block)
FinishBlock(BodyBlock);
if (Stmt* C = W->getCond()) {
Block = ExitConditionBlock;
EntryConditionBlock = addStmt(C);
+ assert (Block == EntryConditionBlock);
if (Block) FinishBlock(EntryConditionBlock);
}
CFGBlock* BodyBlock = Visit(W->getBody());
if (!BodyBlock)
- BodyBlock = ExitConditionBlock; // can happen for "while(...) ;"
+ BodyBlock = EntryConditionBlock; // can happen for "while(...) ;"
else if (Block)
FinishBlock(BodyBlock);
BodyBlock = Visit(D->getBody());
if (!BodyBlock)
- BodyBlock = ExitConditionBlock; // can happen for "do ; while(...)"
+ BodyBlock = EntryConditionBlock; // can happen for "do ; while(...)"
else if (Block)
FinishBlock(BodyBlock);