]> granicus.if.org Git - clang/commit
[analyzer] Also transform "a < b" to "(b - a) > 0" in the constraint manager.
authorJordan Rose <jordan_rose@apple.com>
Sat, 23 Mar 2013 01:21:23 +0000 (01:21 +0000)
committerJordan Rose <jordan_rose@apple.com>
Sat, 23 Mar 2013 01:21:23 +0000 (01:21 +0000)
commit281698935f62ac1d35ddd3533a562c1589aadc8b
treeebdcb3eb404f96dc1b251a994db95a5574109d2e
parent8569281fb7ce9b5ca164a0528b876acbb45eb989
[analyzer] Also transform "a < b" to "(b - a) > 0" in the constraint manager.

We can support the full range of comparison operations between two locations
by canonicalizing them as subtraction, as in the previous commit.

This won't work (well) if either location includes an offset, or (again)
if the comparisons are not consistent about which region comes first.

<rdar://problem/13239003>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177803 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp
test/Analysis/ptr-arith.c