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

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


https://github.com/Sirraide commented:

The implementation lgtm, but I think we can do some deduplication in the tests by adding a second `RUN` line to the `.c` file that specifies `-x c++` and then only adding tests for truly C++-specific constructs in the `.cpp` file.

Also, while you’re at it, could you add some tests for functional-style casts (e.g. `double(f)`) as well as some tests involving templates (e.g. `T{f}` where `T` is a template parameter instantiated as `double`).

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


More information about the cfe-commits mailing list