aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Tooling/CompilationDatabaseTest.cpp
diff options
context:
space:
mode:
authorAdam Balogh <adam.balogh@ericsson.com>2018-04-11 06:21:12 +0000
committerAdam Balogh <adam.balogh@ericsson.com>2018-04-11 06:21:12 +0000
commit2bbccca9f75b6bce08d77cf19abfb206d0c3bc2e (patch)
treef2d4b1cd2a3b4dc788ca5434c37f9b28574654d0 /clang/unittests/Tooling/CompilationDatabaseTest.cpp
parentbfd98d064a126aca73d257edb8cc956872bcfdb9 (diff)
downloadllvm-2bbccca9f75b6bce08d77cf19abfb206d0c3bc2e.zip
llvm-2bbccca9f75b6bce08d77cf19abfb206d0c3bc2e.tar.gz
llvm-2bbccca9f75b6bce08d77cf19abfb206d0c3bc2e.tar.bz2
[Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)
Since the range-based constraint manager (default) is weak in handling comparisons where symbols are on both sides it is wise to rearrange them to have symbols only on the left side. Thus e.g. A + n >= B + m becomes A - B >= m - n which enables the constraint manager to store a range m - n .. MAX_VALUE for the symbolic expression A - B. This can be used later to check whether e.g. A + k == B + l can be true, which is also rearranged to A - B == l - k so the constraint manager can check whether l - k is in the range (thus greater than or equal to m - n). The restriction in this version is the the rearrangement happens only if both the symbols and the concrete integers are within the range [min/4 .. max/4] where min and max are the minimal and maximal values of their type. The rearrangement is not enabled by default. It has to be enabled by using -analyzer-config aggressive-relational-comparison-simplification=true. Co-author of this patch is Artem Dergachev (NoQ). Differential Revision: https://reviews.llvm.org/D41938 llvm-svn: 329780
Diffstat (limited to 'clang/unittests/Tooling/CompilationDatabaseTest.cpp')
0 files changed, 0 insertions, 0 deletions