[analyzer][solver][NFC] Refactor how we detect (dis)equalities
authorValeriy Savchenko <vsavchenko@apple.com>
Fri, 9 Jul 2021 09:36:13 +0000 (12:36 +0300)
committerValeriy Savchenko <vsavchenko@apple.com>
Tue, 13 Jul 2021 18:00:30 +0000 (21:00 +0300)
commit60bd8cbc0c84a41146b1ad6c832fa75f48cd2568
treedc57556b129686b253b61c8cef2f11911ef605b9
parentf26deb4e6ba7e00c57b4be888c4d20c95a881154
[analyzer][solver][NFC] Refactor how we detect (dis)equalities

This patch simplifies the way we deal with (dis)equalities.
Due to the symmetry between constraint handler and range inferrer,
we can have very similar implementations of logic handling
questions about (dis)equality and assumptions involving (dis)equality.

It also helps us to remove one more visitor, and removes uncertainty
that we got all the right places to put `trackNE` and `trackEQ`.

Differential Revision: https://reviews.llvm.org/D105693
clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
clang/test/Analysis/equality_tracking.c