Instead of checking the range manually, changed the checker to use assumeInclusiveRangeDual instead.
This patch was part of D28955.
Differential D73062
[analyzer] Simplify BoolAssignmentChecker mikhail.ramalho on Jan 20 2020, 11:33 AM. Authored by
Details
Instead of checking the range manually, changed the checker to use assumeInclusiveRangeDual instead. This patch was part of D28955.
Diff Detail Event TimelineComment Actions Thanks!!! Small patches are so nice to review.
|
I believe this should be !StIn. I.e., the right check to do is "the value is known to be not boolean" (this is definitely a buggy execution path the static analyzer managed to discover), whereas "the value is not known to be definitely boolean" is the wrong check to do (the static analyzer doesn't have enough information to conclude that the value is definitely boolean, which might be because the value may be non-boolean, but it's more likely that this happens because the static analyzer simply doesn't know enough about the program).
I think this change should fix the regressions on the test suite.