[analyzer] Minor fixes and improvements to debug.ExprInspection
authorArtem Dergachev <artem.dergachev@gmail.com>
Wed, 30 Nov 2016 17:57:18 +0000 (17:57 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Wed, 30 Nov 2016 17:57:18 +0000 (17:57 +0000)
commit30ed5467a476e5f09efaf1a11f1d971f05f18adf
treef6fd93b34230a446c83355a8f9cfc4902f0521a2
parenta3fe70d233b94c906c606dfbb9cf1cb95d4a33a8
[analyzer] Minor fixes and improvements to debug.ExprInspection

- Fix the bug with transition handling in ExprInspectionChecker's
  checkDeadSymbols implementation.

- Test this bug by adding a new function clang_analyzer_numTimesReached() to
  catch number of passes through the code, which should be handy for testing
  against unintended state splits.

- Add two more functions should help debugging issues quickly without running
  the debugger or dumping exploded graphs - clang_analyzer_dump() which dump()s
  an SVal argument to a warning message, and clang_analyzer_printState(), which
  dump()s the current program state to stderr.

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

llvm-svn: 288257
clang/docs/analyzer/DebugChecks.rst
clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
clang/test/Analysis/expr-inspection.c [new file with mode: 0644]
clang/test/Analysis/symbol-reaper.c