aaron.ballman added a comment.

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?


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
  • [PATCH] D151575: [cla... Aaron Ballman via Phabricator via cfe-commits

Reply via email to