[PATCH] D112621: [analyzer][solver] Introduce reasoning for not equal to operator
Manas Gupta via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 6 11:50:54 PDT 2022
manas marked 2 inline comments as done.
manas added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1272-1273
+ // (x != y).
+ if ((ConvertedLHS.getMaxValue() < ConvertedRHS.getMinValue()) ||
+ (ConvertedLHS.getMinValue() > ConvertedRHS.getMaxValue())) {
+ return getTrueRange(T);
----------------
steakhal wrote:
> This and the subsequent similar block could be implemented by a member function of a `RangeSet`.
> It's highly likely that many of these `VisitBinaryOperator<Op>()` functions could benefit from reusing them in the future if we decide to handle more of them.
I agree. I will try to find similarities which can be extracted from remaining binops and put them I a member function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112621/new/
https://reviews.llvm.org/D112621
More information about the cfe-commits
mailing list