[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 10 10:45:16 PST 2018


NoQ added a comment.

In https://reviews.llvm.org/D35110#969782, @baloghadamsoftware wrote:

> Strange, but modifying the tests from `m <relation> n` to `m - n <relation> 0`  does not help. The statement `if (m - n <relation> 0)` does not store a range for `m - n` in the constraint manager. With the other patch which automatically changes `m <relation> n` to `m - n <relation> 0` the range is stored automatically.


I guess we can easily assume how a `SymIntExpr` relates to a number by storing a range on the opaque left-hand-side symbol, no matter how complicated it is, but we cannot assume how a symbol relates to a symbol (there's no obvious range to store). That's just how `assumeSym` currently works.


https://reviews.llvm.org/D35110





More information about the cfe-commits mailing list