================
@@ -10591,6 +10591,45 @@ static void checkArithmeticNull(Sema &S, ExprResult
&LHS, ExprResult &RHS,
<< LHS.get()->getSourceRange() << RHS.get()->getSourceRange();
}
+static void DetectPrecisionLossInComplexDivision(Sema &S, QualType DivisorTy,
+ SourceLocation OpLoc) {
+ // If the divisor is real, then this is real/real or complex/real division.
+ // Either way there can be no precision loss.
+ auto *CT = DivisorTy->getAs<ComplexType>();
+ if (!CT)
+ return;
----------------
Maetveis wrote:
No, this is true either way, because we're doing elementwise divisions only.
Complex divided by real: `(a + bi)/c = a/c + (b/c)i`. Here both divisions are
already precise by definition.
https://github.com/llvm/llvm-project/pull/131477
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits