implement comma for complex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41235 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CGComplexExpr.cpp b/CodeGen/CGComplexExpr.cpp
index 7f94e26..c7296fc 100644
--- a/CodeGen/CGComplexExpr.cpp
+++ b/CodeGen/CGComplexExpr.cpp
@@ -77,6 +77,8 @@
// No comparisons produce a complex result.
ComplexPairTy VisitBinAssign (const BinaryOperator *E);
+ ComplexPairTy VisitBinComma (const BinaryOperator *E);
+
ComplexPairTy VisitConditionalOperator(const ConditionalOperator *CO);
// case Expr::ChooseExprClass:
@@ -150,6 +152,10 @@
return Val;
}
+ComplexPairTy ComplexExprEmitter::VisitBinComma(const BinaryOperator *E) {
+ CGF.EmitStmt(E->getLHS());
+ return Visit(E->getRHS());
+}
ComplexPairTy ComplexExprEmitter::
VisitConditionalOperator(const ConditionalOperator *E) {