arphaman added a comment.

It might make sense to add a breakpoint at `PartialDiagnostic(unsigned DiagID, 
StorageAllocator &Allocator)`, I'll check how that works.

I reckon it should be possible to have a script that could find the name of all 
emitted diagnostics. Let's say we'd like to run clang with `-cc1 main.cpp`.
If we run it in LLDB and put a breakpoint at DiagnosticsEngine::Report, we 
could add a command to that breakpoint that would print a unique string and the 
diagnostic id.
The script would redirect the stdout from LLDB/Clang, but it would replace the 
occurrence of the unique string and diagnostic id with the name of the 
diagnostic by evaluating some `diagtool` that maps the id back to the 
diagnostic (If there are multiple same diagnostics it could also add an id and 
then we could extend this script to stop at the Nth specific diagnostic).


Repository:
  rL LLVM

https://reviews.llvm.org/D36083



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to