[analyzer][solver] Use all sources of constraints
authorValeriy Savchenko <vsavchenko@apple.com>
Thu, 1 Jul 2021 09:51:52 +0000 (12:51 +0300)
committerValeriy Savchenko <vsavchenko@apple.com>
Tue, 6 Jul 2021 08:09:08 +0000 (11:09 +0300)
commit6017cb31bb3548641465ea66219e11abc3106d38
tree3c40b0e63b04109426e75653e4be35d4b8931792
parent64be5b7d87139c5fa9cfbe9ee413dc15d04cedb7
[analyzer][solver] Use all sources of constraints

Prior to this patch, we always gave priority to constraints that we
actually know about symbols in question.  However, these can get
outdated and we can get better results if we look at all possible
sources of knowledge, including sub-expressions.

Differential Revision: https://reviews.llvm.org/D105436
clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
clang/test/Analysis/constant-folding.c