[PATCH] D36083: [utils] Add a script that runs clang in LLDB and stops it when a specified diagnostic is emitted

2017-08-02 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. In https://reviews.llvm.org/D36083#827745, @arphaman wrote: > Makes sense. I'll see if I can get somewhere with the regex idea. Btw, I created a quick prototype with sed and found that the diag strings aren't unique -- which isn't surprising since there's no

[PATCH] D36083: [utils] Add a script that runs clang in LLDB and stops it when a specified diagnostic is emitted

2017-08-01 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Makes sense. I'll see if I can get somewhere with the regex idea. Repository: rL LLVM https://reviews.llvm.org/D36083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36083: [utils] Add a script that runs clang in LLDB and stops it when a specified diagnostic is emitted

2017-08-01 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. This is a good example of how to script lldb, but it's predicated on knowing the diag name, which is great if you know the name. However, this isn't my use case. I don't have the diag name, just a diagnostic message. In order to get the diag name associated with a

[PATCH] D36083: [utils] Add a script that runs clang in LLDB and stops it when a specified diagnostic is emitted

2017-07-31 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. It might make sense to add a breakpoint at `PartialDiagnostic(unsigned DiagID, StorageAllocator )`, 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

[PATCH] D36083: [utils] Add a script that runs clang in LLDB and stops it when a specified diagnostic is emitted

2017-07-31 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. Cool, I'll try to play with this later today. BTW, since the call to DiagnosticsEngine::Report is delayed when using PartialDiagnostic, would it make sense to add them as well? Also, this doesn't seem to solve the initial problem of finding the Diag name in the first

[PATCH] D36083: [utils] Add a script that runs clang in LLDB and stops it when a specified diagnostic is emitted

2017-07-31 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This script is useful while working on and debugging Clang's diagnostics, as you don't have to figure out where the diagnostic is emitted before setting a breakpoint for the emission of that diagnostic. Repository: rL LLVM https://reviews.llvm.org/D36083