[clang] [clang] Detect int-to-float narrowing when the back-conversion is unspecified (PR #157174)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 6 18:39:21 PDT 2025


================
@@ -308,6 +308,8 @@ Bug Fixes in This Version
 - Builtin elementwise operators now accept vector arguments that have different
   qualifiers on their elements. For example, vector of 4 ``const float`` values
   and vector of 4 ``float`` values. (#GH155405)
+- Fix the check for narrowing int-to-float conversions, so that they are detected in
+  cases where converting the float back to an integer is undefined behaviour (#GH157067).
----------------
zwuis wrote:

This can be moved to "Bug Fixes to C++ Support" subsection.

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


More information about the cfe-commits mailing list