[PATCH] D104844: [Analyzer][solver] Fix crashes during symbol simplification

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 24 08:03:26 PDT 2021


martong added a comment.

> I don't really get why we get not simplified symbol to begin with.

This is because of the Environment bindings. I.e.` b1` is bound to `$a0 - $b0 + $c` when we evaluate `int b1 = (unsigned)a1 + c;`. This binding is not changed/updated, so when we evaluate the division then we query the DeclRefExpr for `b1` from the Environment and that gives still `$a0 - $b0 + $c`. We either do the simplification in the ConstraintManager (as we do now with this and the parent patch) or perhaps we could try to simplify the Environment bindings as an alternative solution.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104844/new/

https://reviews.llvm.org/D104844



More information about the cfe-commits mailing list