This module adds a breakpoint for calls to DiagnosticsEngine::Report which will fire each time a diagnostic, e.g., error, warning, etc., is hit, and add breakpoints for all locations where that diagnostic ID is used.
It is intended for use by developers and relies on diagtool being in the same directory of the executable begin debugged, e.g.:
$ lldb bin/clang-6.0
(lldb) target create "bin/clang-6.0"
Current executable set to 'bin/clang-6.0' (x86_64).
(lldb) command script import ../../llvm/tools/clang/utils/clangdiag.py
The "clangdiag" command has been installed, type "help clangdiag" or "clangdiag --help" for detailed help.
(lldb) clangdiag enable
(lldb) run <....>
Breakpoints get added as DiagnosticsEngine::Report is seen, so you will need to run it twice.