It could happen that both the satisfied and unsatisfied constraints gave
a NULL state. This happened probably because the negate() functionality
was not perfect. The solution is to return both states from the assume
calls where it makes sense.
This way the code becomes cleaner, there is no need anymore for the
controversial negate().
Note that this causes a regression in our CTU builds.
http://codechecker-buildbot.eastus.cloudapp.azure.com:8080/job/ctu_pipeline_clang-master-monorepo/1720/
The error itself is not CTU related, however, the coverage and thus the path is different in that mode.
I suggest the same simpler version for the similar code segments as well.
By the same token, why do you return {State, State}?
Shouldn't you return {State, nullptr} there?
In general, one would not expect the same State being returned, IMO it's advised to avoid doing that.
Same applies for the other cases.