[PATCH] D110910: [analyzer][solver] Fix CmpOpTable handling bug
Denys Petrov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 6 09:32:14 PDT 2021
ASDenysPetrov added a comment.
LGTM
================
Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1129-1134
+ // We use this variable to store the last queried operator (`QueriedOP`)
+ // for which the `getCmpOpState` returned with `Unknown`. If there are two
+ // different OPs that returned `Unknown` then we have to query the special
+ // `UnknownX2` column. We assume that `getCmpOpState(CurrentOP, CurrentOP)`
+ // never returns `Unknown`, so `CurrentOP` is a good initial value.
+ BinaryOperatorKind LastQueriedOpToUnknown = CurrentOP;
----------------
Perfect explanation. This is really worth to be here.
P.S. My nit. Disregard if you think it is unnecessary.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110910/new/
https://reviews.llvm.org/D110910
More information about the cfe-commits
mailing list