Reland "[analyzer] Canonicalize SymIntExpr so the RHS is positive when possible"
This PR changes the `SymIntExpr` so the expression that uses a negative value as `RHS`, for example: `x +/- (-N)`, is modeled as `x -/+ N` instead. This avoids producing a very large `RHS` when the symbol is cased to an unsigned number, and as consequence makes the value more robust in presence of casts. Note that this change is not applied if `N` is the lowest negative value for which negation would not be representable. Reviewed By: steakhal Patch By: tomasz-kaminski-sonarsource! Differential Revision: https://reviews.llvm.org/D124658
Loading
Please sign in to comment