[clang] [analyzer] Model concrete floating-point values (PR #214098)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 21 10:01:26 PDT 2026


================
@@ -559,6 +555,16 @@ features cannot lower the translation-unit ABI level;
 - The lock-order-reversal check in ``alpha.unix.PthreadLock`` is now disabled by default.
   It can be re-enabled with the ``WarnOnLockOrderReversal`` option.
 
+- The analyzer now models concrete floating-point values. Floating-point
+  literals, simple arithmetic operations, and casts, including to and from
+  integer types, are tracked as concrete values instead of being treated as
+  unknown. Only results that are exact (independent of rounding mode and
+  evaluation precision) are modeled. Infinities and NaNs remain unknown, because
+  a NaN's bit pattern is non-deterministic. Subnormals remain unknown because
+  their semantics are controlled by factors the analyzer cannot see.
+  ``__ibm128`` is not modeled, since LLVM implements several of its operations
+  through an inaccurate fallback format. Fixes #GH82910.
----------------
steakhal wrote:

```suggestion
- The analyzer now models concrete floating-point values. Floating-point
  literals, simple arithmetic operations, and casts, including to and from
  integer types, are tracked as concrete values instead of being treated as
  unknown. Only results that are exact (independent of rounding mode and
  evaluation precision) are modeled. Infinities, NaNs, subnormals remain
  unknown. (#GH82910)
```

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


More information about the cfe-commits mailing list