[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:29 PDT 2026


================
@@ -456,6 +472,13 @@ SVal SValBuilder::evalMinus(NonLoc X) {
   switch (X.getKind()) {
   case nonloc::ConcreteIntKind:
     return makeIntVal(-X.castAs<nonloc::ConcreteInt>().getValue());
+  case nonloc::ConcreteFloatKind: {
+    // Negation is well-defined regardless of floating-point semantics (it's
+    // just a sign bit flip).
----------------
steakhal wrote:

```suggestion
    // Negation is well-defined regardless of floating-point semantics
    // (it's just a sign bit flip).
```

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


More information about the cfe-commits mailing list