[analyzer][solver] Improve reasoning for not equal to operator
authorManas <manas18244@iiitd.ac.in>
Tue, 24 Jan 2023 20:59:05 +0000 (02:29 +0530)
committerManas <manas18244@iiitd.ac.in>
Tue, 24 Jan 2023 21:02:55 +0000 (02:32 +0530)
commit5f02ad880e423a33f903299f0123e9d8a59bbe8d
tree38576b338416d6aba9b31d707fc1a98809cab306
parent8700beee9367fdf95d146c810855125a51006063
[analyzer][solver] Improve reasoning for not equal to operator

This patch fixes certain cases where solver was not able to infer
disequality due to overlapping of values in rangeset. This case was
casting from lower signed type to bigger unsigned type.

Reviewed By: steakhal

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