[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

Zahira Ammarguellat via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 12 13:17:15 PDT 2024


================
@@ -21,6 +25,7 @@ void a() {
   EVALF((2. + 3i) + (4. + 5i), 6. + 8i);
   EVALF((2. + 3i) - (4. + 5i), -2. - 2i);
   EVALF((2. + 3i) * (4. + 5i), -7. + 22i);
+  // div-precision-warning at +1 {{excess precision is requested but the target does not support excess precision which may result in observable differences in arithmetic behavior ,additional use of 'long double' were found but not diagnosed}}
----------------
zahiraam wrote:

In this case, we are promoting `double` to `long double` (the higher type) but on Windows `double` and `long double` have the same size, so the warning is there for that.

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


More information about the cfe-commits mailing list