llvm-project
3cc56dd8 - [Clang] [Sema] Fix -Wdouble-promotion in C++ list-initialization (#159992)

Commit
44 days ago
[Clang] [Sema] Fix -Wdouble-promotion in C++ list-initialization (#159992) Resolves https://github.com/llvm/llvm-project/issues/33409. The information `IsListInit` is already passed to function `CheckImplicitConversion` for another use-case which makes adding a condition for the double-promotion case simple. Also adds tests, both for the changed list-initialization case as well as for normal explicit casts which already would have passed before this PR. These negative tests are added directly next to the positive tests in `warn-double-promotion.c` or for the C++-specific cases in a new .cpp version of that file.
Author
Parents
Loading