arphaman added a comment.

Thanks, that's pretty cool!

How bigger did the clang binary get after you've added all these strings?
I feel like this is more of a CC1 option as well.

I have some feedback for your additional ideas:

> add another option to pass in the index (or enum) to force an assert or 
> backtrace when a specific DiagID is seen.

That sounds quite useful, but could it be something that's more suited for an 
external debugging script? I have a personal script that computes the enum 
value for a particular diagnostic, launches clang in lldb, sets a breakpoint 
for that particular diagnostic enum and runs clang. I could work on upstreaming 
it into clang/utils if people are interested.

> capture FILE and LINE when a diagnostic is created and output it. This would 
> make it easier to find the specific instance, and verify all instances are 
> actually tested. Currently, it's almost impossible to determine if all 
> instances are actually tested.

I reckon the first part (find the specific instance) could be useful, but I 
think that if you can force a backtrace on a specific DiagID then it becomes 
less useful. I disagree with the second part, can't you use our coverage bots 
and see if the all places where the diagnostic is emitted are covered to see if 
they are tested? It might be tedious to find these places, but maybe we can add 
a search for our coverage viewer so you quickly find the lines that have the 
name of diagnostic?


https://reviews.llvm.org/D35175



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

Reply via email to