[Analyzer] Quick Fix for exponential execution time when simpilifying complex additiv...
authorAdam Balogh <adam.balogh@ericsson.com>
Mon, 23 Jul 2018 10:50:20 +0000 (10:50 +0000)
committerAdam Balogh <adam.balogh@ericsson.com>
Mon, 23 Jul 2018 10:50:20 +0000 (10:50 +0000)
commitdcde8acc32f1355f37d3bc2814c528fdc2ca5f94
tree5177948aef1b2dcbc9bdda4995e31233939f3af1
parent4bb7883d097f324d8c1d5f9f50e09c7471340abe
[Analyzer] Quick Fix for exponential execution time when simpilifying complex additive expressions

Patch https://reviews.llvm.org/rC329780 not only rearranges comparisons but
also binary expressions. This latter behavior is not protected by the analyzer
option. Hower, since no complexity threshold is enforced to the symbols this
may result in exponential execution time if the expressions are too complex:
https://bugs.llvm.org/show_bug.cgi?id=38208. For a quick fix we extended the
analyzer option to also cover the additive cases.

This is only a temporary fix, the final solution should be enforcing the
complexity threshold to the symbols.

Differential Revision: https://reviews.llvm.org/D49536

llvm-svn: 337678
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
clang/test/Analysis/constraint_manager_negate_difference.c
clang/test/Analysis/iterator-range.cpp
clang/test/Analysis/plist-macros.cpp
clang/test/Analysis/svalbuilder-rearrange-comparisons.c