[clang] [analyzer] Generalize field initializer resolution in RegionStore (PR #189361)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 1 02:31:45 PDT 2026


https://github.com/steakhal commented:

I had a quick look, and I didn't spot bugs - partially because we have mutation and a bunch of return statements so it's not the easiest to follow.
I only have stylistic suggestions. One that particularly bogs me is that we should brace non-trivial if guarded blocks.

For example the [braces rule](https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements).
For example, this definitely deserves a brace:
```
    if (!ILE)
      return isa<ImplicitValueInitExpr>(E)
                 ? std::optional<SVal>(svalBuilder.makeZeroVal(LeafTy))
                 : std::nullopt;
```

Overall, I think the patch looks good!

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


More information about the cfe-commits mailing list