]> granicus.if.org Git - clang/commitdiff
[analyzer] Document the issue hash debugging facility
authorGabor Horvath <xazax.hun@gmail.com>
Mon, 13 Nov 2017 11:13:02 +0000 (11:13 +0000)
committerGabor Horvath <xazax.hun@gmail.com>
Mon, 13 Nov 2017 11:13:02 +0000 (11:13 +0000)
Differential Revision: https://reviews.llvm.org/D39543

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318030 91177308-0d34-0410-b5e6-96231b3b80d8

docs/analyzer/DebugChecks.rst

index e2a8e05417b69fa88492fca849fefea8e7840cc0..67521b82cabca8423eb4ff658575e806c3f8f4b4 100644 (file)
@@ -242,6 +242,19 @@ ExprInspection checks
       clang_analyzer_printState(); // Read the stderr!
     }
 
+- ``void clang_analyzer_hashDump(int);``
+
+  The analyzer can generate a hash to identify reports. To debug what information
+  is used to calculate this hash it is possible to dump the hashed string as a
+  warning of an arbitrary expression using the function above.
+
+  Example usage::
+
+    void foo() {
+      int x = 1;
+      clang_analyzer_hashDump(x); // expected-warning{{hashed string for x}}
+    }
+
 Statistics
 ==========