[analyzer] Introduce clang_analyzer_eval for regression test constraint checks.
authorJordy Rose <jediknil@belkadan.com>
Wed, 16 May 2012 16:01:07 +0000 (16:01 +0000)
committerJordy Rose <jediknil@belkadan.com>
Wed, 16 May 2012 16:01:07 +0000 (16:01 +0000)
commit31ae259a41a196e89c9b0d60a1154257744bdccc
tree12cdf209c6ae84270b785c807906e32cac32345d
parent4d16c4c669632e9b3170716e4548301d9a7bf558
[analyzer] Introduce clang_analyzer_eval for regression test constraint checks.

The new debug.ExprInspection checker looks for calls to clang_analyzer_eval,
and emits a warning of TRUE, FALSE, or UNKNOWN (or UNDEFINED) based on the
constrained value of its (boolean) argument. It does not modify the analysis
state though the conditions tested can result in branches (e.g. through the
use of short-circuit operators).

llvm-svn: 156919
clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
clang/lib/StaticAnalyzer/Checkers/Checkers.td
clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp [new file with mode: 0644]
clang/test/Analysis/global-region-invalidation.c