[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 21 13:48:01 PDT 2025


Sirraide wrote:

Also, it’d probably also be a good idea to add a test like
```c++
struct A {
    A(double f) {}
};
float f;
A a{f};
```
to make sure we only suppress the diagnostic if the type we’re list-initialising is actually `double`/`long double`.

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


More information about the cfe-commits mailing list