[clang] [Clang][Sema] Fix -Whigher-precision-for-complex-division (PR #131477)

Zahira Ammarguellat via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 8 07:05:58 PDT 2025


=?utf-8?q?Mészáros?= Gergely <maetveis at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/131477 at github.com>


================
@@ -10685,6 +10724,7 @@ QualType Sema::CheckMultiplyDivideOperands(ExprResult &LHS, ExprResult &RHS,
   if (compType.isNull() || !compType->isArithmeticType())
     return InvalidOperands(Loc, LHS, RHS);
   if (IsDiv) {
+    DetectPrecisionLossInComplexDivision(*this, RHS.get()->getType(), Loc);
----------------
zahiraam wrote:

This is only looking at the type of the `RHS` which represents the divisor, right? When is the dividend looked at?

https://github.com/llvm/llvm-project/pull/131477


More information about the cfe-commits mailing list