Ensure an insertion point at the end of a statement-expression.
Fixes PR8967.
llvm-svn: 123360
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp
index f02145e..0369077 100644
--- a/clang/lib/CodeGen/CGExprAgg.cpp
+++ b/clang/lib/CodeGen/CGExprAgg.cpp
@@ -368,6 +368,7 @@
void AggExprEmitter::VisitStmtExpr(const StmtExpr *E) {
CGF.EmitCompoundStmt(*E->getSubStmt(), true, Dest);
+ CGF.EnsureInsertPoint();
}
void AggExprEmitter::VisitBinaryOperator(const BinaryOperator *E) {