[analyzer][solver] Prevent infeasible states (PR49490)
authorValeriy Savchenko <vsavchenko@apple.com>
Wed, 10 Mar 2021 13:50:34 +0000 (16:50 +0300)
committerValeriy Savchenko <vsavchenko@apple.com>
Fri, 12 Mar 2021 12:56:48 +0000 (15:56 +0300)
commit6dc152350824d0abcf4e1836c2846f8f9256779c
tree7c8687c09732e47966cfd5ff497e008f01b0d33f
parentf50aef745c3ba981f3d0bf118b809d0c3880a490
[analyzer][solver] Prevent infeasible states (PR49490)

This patch fixes the situation when our knowledge of disequalities
can help us figuring out that some assumption is infeasible, but
the solver still produces a state with inconsistent constraints.

Additionally, this patch adds a couple of assertions to catch this
type of problems easier.

Differential Revision: https://reviews.llvm.org/D98341
clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
clang/test/Analysis/PR49490.cpp [new file with mode: 0644]