on code containing GNU statement expressions reported in PR 8141.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113953
91177308-0d34-0410-b5e6-
96231b3b80d8
if (Stmt* C = F->getCond()) {
Block = ExitConditionBlock;
EntryConditionBlock = addStmt(C);
- assert(Block == EntryConditionBlock);
+ assert(Block == EntryConditionBlock ||
+ (Block == 0 && EntryConditionBlock == Succ));
// If this block contains a condition variable, add both the condition
// variable and initializer to the CFG.
}
@end
+// PR 8149 - GNU statement expression in condition of ForStmt.
+// This previously triggered an assertion failure in CFGBuilder.
+void pr8149(void) {
+ for (; ({ do { } while (0); 0; });) { }
+}
+