aboutsummaryrefslogtreecommitdiff
path: root/docs/analyzer
diff options
context:
space:
mode:
Diffstat (limited to 'docs/analyzer')
-rw-r--r--docs/analyzer/DebugChecks.rst39
-rw-r--r--docs/analyzer/IPA.txt2
-rw-r--r--docs/analyzer/conf.py4
3 files changed, 42 insertions, 3 deletions
diff --git a/docs/analyzer/DebugChecks.rst b/docs/analyzer/DebugChecks.rst
index bfa3142efbdf..ecf11ca0f133 100644
--- a/docs/analyzer/DebugChecks.rst
+++ b/docs/analyzer/DebugChecks.rst
@@ -138,6 +138,17 @@ ExprInspection checks
clang_analyzer_warnIfReached(); // no-warning
}
+- void clang_analyzer_numTimesReached();
+
+ Same as above, but include the number of times this call expression
+ gets reached by the analyzer during the current analysis.
+
+ Example usage::
+
+ for (int x = 0; x < 3; ++x) {
+ clang_analyzer_numTimesReached(); // expected-warning{{3}}
+ }
+
- void clang_analyzer_warnOnDeadSymbol(int);
Subscribe for a delayed warning when the symbol that represents the value of
@@ -180,6 +191,18 @@ ExprInspection checks
clang_analyzer_explain(ptr); // expected-warning{{memory address '0'}}
}
+- void clang_analyzer_dump(a single argument of any type);
+
+ Similar to clang_analyzer_explain, but produces a raw dump of the value,
+ same as SVal::dump().
+
+ Example usage::
+
+ void clang_analyzer_dump(int);
+ void foo(int x) {
+ clang_analyzer_dump(x); // expected-warning{{reg_$0<x>}}
+ }
+
- size_t clang_analyzer_getExtent(void *);
This function returns the value that represents the extent of a memory region
@@ -197,6 +220,22 @@ ExprInspection checks
clang_analyzer_explain(ys); // expected-warning{{'8'}}
}
+- void clang_analyzer_printState();
+
+ Dumps the current ProgramState to the stderr. Quickly lookup the program state
+ at any execution point without ViewExplodedGraph or re-compiling the program.
+ This is not very useful for writing tests (apart from testing how ProgramState
+ gets printed), but useful for debugging tests. Also, this method doesn't
+ produce a warning, so it gets printed on the console before all other
+ ExprInspection warnings.
+
+ Example usage::
+
+ void foo() {
+ int x = 1;
+ clang_analyzer_printState(); // Read the stderr!
+ }
+
Statistics
==========
diff --git a/docs/analyzer/IPA.txt b/docs/analyzer/IPA.txt
index 14da71e09030..3842075fcd6a 100644
--- a/docs/analyzer/IPA.txt
+++ b/docs/analyzer/IPA.txt
@@ -303,7 +303,7 @@ Currently, there are 2 modes:
DynamicDispatchModeConservative - Models the case where the dynamic type
information is assumed to be incorrect, for example, implies that the method
- definition is overriden in a subclass. In such cases, ExprEngine does not
+ definition is overridden in a subclass. In such cases, ExprEngine does not
inline the methods sent to the receiver (MemoryRegion), even if a candidate
definition is available. This mode is conservative about simulating the
effects of a call.
diff --git a/docs/analyzer/conf.py b/docs/analyzer/conf.py
index afbfbee6f379..6b54b0646eca 100644
--- a/docs/analyzer/conf.py
+++ b/docs/analyzer/conf.py
@@ -49,9 +49,9 @@ copyright = u'2013-%d, Analyzer Team' % date.today().year
# built documents.
#
# The short X.Y version.
-version = '3.9'
+version = '4.0'
# The full version, including alpha/beta/rc tags.
-release = '3.9'
+release = '4.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.