[Analyzer][Core] Better simplification in SimpleSValBuilder::evalBinOpNN
authorGabor Marton <gabor.marton@ericsson.com>
Thu, 11 Nov 2021 13:55:24 +0000 (14:55 +0100)
committerGabor Marton <gabor.marton@ericsson.com>
Tue, 23 Nov 2021 15:38:01 +0000 (16:38 +0100)
commit12887a202404471ddf77f9fae658700573cbebe8
treef1a3338f4997e1426d89d0826ec7a1d97fe39581
parente13246a2ec3dfc13838d43099ca9111c780d2c5e
[Analyzer][Core] Better simplification in SimpleSValBuilder::evalBinOpNN

Make the SValBuilder capable to simplify existing
SVals based on a newly added constraints when evaluating a BinOp.

Before this patch, we called `simplify` only in some edge cases.
However, we can and should investigate the constraints in all cases.

Differential Revision: https://reviews.llvm.org/D113753
clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
clang/test/Analysis/svalbuilder-simplify-in-evalbinop.cpp [new file with mode: 0644]