================
@@ -23,7 +23,14 @@ RangedConstraintManager::~RangedConstraintManager() {}
ProgramStateRef RangedConstraintManager::assumeSym(ProgramStateRef State,
SymbolRef Sym,
bool Assumption) {
- Sym = simplify(State, Sym);
+ SVal SimplifiedVal = simplifyToSVal(State, Sym);
+ if (SimplifiedVal.isConstant()) {
+ bool Feasible = SimplifiedVal.isZeroConstant() ? !Assumption : Assumption;
----------------
NagyDonat wrote:
```suggestion
bool Feasible = SimplifiedVal.isZeroConstant() != Assumption;
```
In my opinion `!=` is probably the shortest and clearest way to represent the
"these two booleans are different" (a.k.a XOR) relationship. (However, this is
just subjective bikeshedding, and feel free to keep the `?:` if you think that
it's better.)
https://github.com/llvm/llvm-project/pull/115579
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits