================ @@ -10555,6 +10555,43 @@ static void checkArithmeticNull(Sema &S, ExprResult &LHS, ExprResult &RHS, << LHS.get()->getSourceRange() << RHS.get()->getSourceRange(); } +static void DetectPrecisionLossInComplexDivision(Sema &S, QualType DivisorTy, + SourceLocation OpLoc) { + // Either real/real or complex/real division. + // Either way there can be no precision loss. + auto *CT = DivisorTy->getAs<ComplexType>(); + if (!CT) + return; ---------------- Sirraide wrote:
Hmm, is this right? If this is the *divisor*, not the *dividend*, then isn’t this just complex/complex division? Because I don’t think real/complex is valid (at least I’d expect us to convert the dividend to a complex number first). https://github.com/llvm/llvm-project/pull/131477 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits