cjdb added a comment.

In D151575#4607047 <https://reviews.llvm.org/D151575#4607047>, @aaron.ballman 
wrote:

> I am wrestling with this one because I think the status quo is unfortunate 
> (we silently drop relevant information in ways the user may not immediately 
> understand) but I think always printing the include stack could be verbose 
> and thus make the diagnostics harder to act on. If we had the ability to 
> hyperlink to other parts of the diagnostic output, then I'd ask if we could 
> perhaps print the full stack once and link to it from anywhere else it's 
> being used, but I can't think of an effective way to do that purely in text. 
> We could also add an explicit option to let the user control the behavior, 
> but I'd prefer to avoid that if possible as the combination of modes makes 
> testing a challenge.
>
> Maybe we should consider adding a flag to set diagnostic verbosity level? 
> e.g., `-fdiagnostic-verbosity=terse|default|verbose` where `terse` never 
> prints notes or include stacks, `default` is what we do today, and `verbose` 
> always prints include stacks?

I'm not fond of `terse` unless each note is printed once: I think that'll get 
misused and lead to a lot of frustration (most notes are genuinely helpful). 
There's a lot of design space here, but I don't think any of it can be achieved 
until we have nested diagnostics, but that requires a complete rewrite of the 
diagnostics engine.

`default` and `verbose` might be interesting though?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151575/new/

https://reviews.llvm.org/D151575

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

Reply via email to