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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 12 12:45:48 PDT 2024


AaronBallman wrote:

> > double foo();
> > double d = 2.0 * foo();
> 
> That's correct. Only for division and only `-fcomplex-arithmetic=promoted` and when the higher precision type of a target is the same than the current precision type.

Okay, then I think there's a bit more work to be done to figure out the most general place we can put the logic for tracking this. If it seems like that's going to be a terrible idea because it pushes logic all over the compiler, then we could decide to only diagnose it for complex division, but we should reword the diagnostic (and probably the diagnostic group) in that case.

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


More information about the cfe-commits mailing list