[PATCH] D39543: [analyzer] Document the issue hash debugging facility
This revision was automatically updated to reflect the committed changes. Closed by commit rL318030: [analyzer] Document the issue hash debugging facility (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D39543?vs=121290=122630#toc Repository: rL LLVM https://reviews.llvm.org/D39543 Files: cfe/trunk/docs/analyzer/DebugChecks.rst Index: cfe/trunk/docs/analyzer/DebugChecks.rst === --- cfe/trunk/docs/analyzer/DebugChecks.rst +++ cfe/trunk/docs/analyzer/DebugChecks.rst @@ -242,6 +242,19 @@ 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 == Index: cfe/trunk/docs/analyzer/DebugChecks.rst === --- cfe/trunk/docs/analyzer/DebugChecks.rst +++ cfe/trunk/docs/analyzer/DebugChecks.rst @@ -242,6 +242,19 @@ 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 == ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D39543: [analyzer] Document the issue hash debugging facility
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. > these kinds of tasks should have the same level of attention as others Dunno really. I'm not sure anybody actually reads that doc instead of accidentally finding the checker code by debugging how the tests work. https://reviews.llvm.org/D39543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D39543: [analyzer] Document the issue hash debugging facility
xazax.hun added inline comments. Comment at: docs/analyzer/DebugChecks.rst:255 + int x = 1; + clang_analyzer_hashDump(x); // Hashed string of x on stderr. +} NoQ wrote: > Unlike `printState` and like all other functions, your function doesn't dump > to plain stderr, but generates warnings instead. I didn't want `printState` > to produce huge warnings because matching them with `expected-warning` would > be more disgusting than `FileCheck`ing, but that's not your case. So i think > you'd like to document it similarly to other functions, probably as `// > expected-warning{{'sample output'}}`. Yeah, sorry for the oversight. :) I wanted to get the documentation part done as soon as possible to work on other parts. But it looks like these kinds of tasks should have the same level of attention as others. https://reviews.llvm.org/D39543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D39543: [analyzer] Document the issue hash debugging facility
xazax.hun updated this revision to Diff 121290. xazax.hun marked 2 inline comments as done. https://reviews.llvm.org/D39543 Files: docs/analyzer/DebugChecks.rst Index: docs/analyzer/DebugChecks.rst === --- docs/analyzer/DebugChecks.rst +++ docs/analyzer/DebugChecks.rst @@ -242,6 +242,19 @@ 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 == Index: docs/analyzer/DebugChecks.rst === --- docs/analyzer/DebugChecks.rst +++ docs/analyzer/DebugChecks.rst @@ -242,6 +242,19 @@ 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 == ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D39543: [analyzer] Document the issue hash debugging facility
NoQ added a comment. Yup, thanks! Comment at: docs/analyzer/DebugChecks.rst:255 + int x = 1; + clang_analyzer_hashDump(x); // Hashed string of x on stderr. +} Unlike `printState` and like all other functions, your function doesn't dump to plain stderr, but generates warnings instead. I didn't want `printState` to produce huge warnings because matching them with `expected-warning` would be more disgusting than `FileCheck`ing, but that's not your case. So i think you'd like to document it similarly to other functions, probably as `// expected-warning{{'sample output'}}`. Repository: rL LLVM https://reviews.llvm.org/D39543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D39543: [analyzer] Document the issue hash debugging facility
jklaehn added inline comments. Comment at: docs/analyzer/DebugChecks.rst:247 + + The analyzer can generate a hash to identify repots. To debug what information + is used to calculate this hash it is possible to dump the hashed string to typo `reports`? Repository: rL LLVM https://reviews.llvm.org/D39543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D39543: [analyzer] Document the issue hash debugging facility
xazax.hun created this revision. Herald added subscribers: szepet, baloghadamsoftware, whisperity. Add documentation to the recently added issue hash dumping function. Repository: rL LLVM https://reviews.llvm.org/D39543 Files: docs/analyzer/DebugChecks.rst Index: docs/analyzer/DebugChecks.rst === --- docs/analyzer/DebugChecks.rst +++ docs/analyzer/DebugChecks.rst @@ -242,6 +242,19 @@ clang_analyzer_printState(); // Read the stderr! } +- ``void clang_analyzer_hashDump(int);`` + + The analyzer can generate a hash to identify repots. To debug what information + is used to calculate this hash it is possible to dump the hashed string to + the stderr of an arbitrary expression using the function above. + + Example usage:: + +void foo() { + int x = 1; + clang_analyzer_hashDump(x); // Hashed string of x on stderr. +} + Statistics == Index: docs/analyzer/DebugChecks.rst === --- docs/analyzer/DebugChecks.rst +++ docs/analyzer/DebugChecks.rst @@ -242,6 +242,19 @@ clang_analyzer_printState(); // Read the stderr! } +- ``void clang_analyzer_hashDump(int);`` + + The analyzer can generate a hash to identify repots. To debug what information + is used to calculate this hash it is possible to dump the hashed string to + the stderr of an arbitrary expression using the function above. + + Example usage:: + +void foo() { + int x = 1; + clang_analyzer_hashDump(x); // Hashed string of x on stderr. +} + Statistics == ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits