diff options
author | Tomasz KamiĆski <tomasz.kaminski@sonarsource.com> | 2022-05-05 17:48:49 +0200 |
---|---|---|
committer | Balazs Benics <balazs.benics@sigmatechnology.se> | 2022-05-05 17:48:49 +0200 |
commit | f0d6cb4a5cf5723d7ddab2c7dab74f2f62116a6d (patch) | |
tree | 68562e174b03fa80b320ef600f0da65af04aa632 /libcxx/src/filesystem/operations.cpp | |
parent | 7cf97d62f40990c2f86f75eb5a1d9cf2bd9de71e (diff) | |
download | llvm-f0d6cb4a5cf5723d7ddab2c7dab74f2f62116a6d.zip llvm-f0d6cb4a5cf5723d7ddab2c7dab74f2f62116a6d.tar.gz llvm-f0d6cb4a5cf5723d7ddab2c7dab74f2f62116a6d.tar.bz2 |
[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
Diffstat (limited to 'libcxx/src/filesystem/operations.cpp')
0 files changed, 0 insertions, 0 deletions