================ @@ -15567,12 +15567,13 @@ bool ComplexExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) { HandleComplexComplexDiv(A, B, C, D, ResR, ResI); } } else { - if (RHS.getComplexIntReal() == 0 && RHS.getComplexIntImag() == 0) - return Error(E, diag::note_expr_divide_by_zero); - ComplexValue LHS = Result; APSInt Den = RHS.getComplexIntReal() * RHS.getComplexIntReal() + RHS.getComplexIntImag() * RHS.getComplexIntImag(); + if ((RHS.getComplexIntReal() == 0 && RHS.getComplexIntImag() == 0) || + Den.isZero()) ---------------- c8ef wrote:
done https://github.com/llvm/llvm-project/pull/104666 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits