[all-commits] [llvm/llvm-project] 3cc56d: [Clang] [Sema] Fix -Wdouble-promotion in C++ list-...

Marcel Jacobse via All-commits all-commits at lists.llvm.org
Wed Sep 24 11:33:50 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3cc56dd82a78964ab0b5edc9738abf90f259e36a
      https://github.com/llvm/llvm-project/commit/3cc56dd82a78964ab0b5edc9738abf90f259e36a
  Author: Marcel Jacobse <mjacobse at uni-bremen.de>
  Date:   2025-09-24 (Wed, 24 Sep 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/Sema/warn-double-promotion.c
    A clang/test/Sema/warn-double-promotion.cpp

  Log Message:
  -----------
  [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list