[PATCH] D140086: [analyzer][solver] Improve reasoning for not equal to operator
Manas Gupta via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 4 16:26:51 PST 2023
manas marked 5 inline comments as done.
manas added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1638-1639
+ if (LHS.isUnsigned() && (LHS.getBitWidth() >= RHS.getBitWidth())) {
+ if (RHS.getMaxValue().isNegative() ||
+ LHS.getAPSIntType().convert(RHS.getMaxValue()) < LHS.getMinValue())
+ return getTrueRange(T);
----------------
I combined the two conditionals as they both were returning TrueRange. Is it readable?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140086/new/
https://reviews.llvm.org/D140086
More information about the cfe-commits
mailing list