[analyzer][solver] Introduce reasoning for not equal to operator
authorManas <manas18244@iiitd.ac.in>
Fri, 9 Dec 2022 12:30:57 +0000 (13:30 +0100)
committerBalazs Benics <benicsbalazs@gmail.com>
Fri, 9 Dec 2022 12:30:57 +0000 (13:30 +0100)
commit77ab7281aa36800dc77dab07bd40e6e0fd9f0b78
treea03ec210af19dea915c34070423fc7c9d2dc356d
parentf4c6d7b8136eb58f9b88a9565e9c3fbc6c0d463b
[analyzer][solver] Introduce reasoning for not equal to operator

With this patch, the solver can infer results for not equal (!=) operator
over Ranges as well. This also fixes the issue of comparison between
different types, by first converting the RangeSets to the resulting type,
which then can be used for comparisons.

Patch by Manas.

Reviewed By: steakhal

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