NoQ added a comment. On second thought, in `RangeConstraintManager` we need a different functionality. In particular, from `4 * x < 1000` it does not follow that `x < 250` in the general case (due to possible overflows). But in the case of this checker, it doesn't matter - we are always sure that any valid array address is never overflowing even when converted to bytes.
That said, it is still boilerplate. Some day i wish to consider adding the non-overflowing versions of common operations into the `SValBuilder`'s `evalBinOp()`, so that it could help checkers simplify various symbolic expressions. In my opinion, `evalBinOp()` should be as user-friendly as possible. But that's another story, your approach looks good to me! https://reviews.llvm.org/D23112 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits