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

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 7 01:08:40 PDT 2017


baloghadamsoftware created this revision.

If range `[m .. n]` is stored for symbolic expression `A - B`, then we can deduce the range for `B - A` which is [-n .. -m]. This is only true for signed types, unless the range is `[0 .. 0]`.


https://reviews.llvm.org/D35110

Files:
  lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
  test/Analysis/std-c-library-functions.c
  test/Analysis/svalbuilder-rearrange-comparisons.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35110.105591.patch
Type: text/x-patch
Size: 9821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170707/e4f2637e/attachment.bin>


More information about the cfe-commits mailing list