dexonsmith added a comment. In https://reviews.llvm.org/D46834#1102391, @rsmith wrote:
> In https://reviews.llvm.org/D46834#1101586, @jkorous wrote: > > > We reconsidered this in light of the policy - thanks for pointing that out > > Richard! > > Just to be sure that I understand it - the policy is meant for CLI and not > > serialized diagnostics, right? > > > The policy certainly seems designed around the CLI use case. For serialized > diagnostics, it would make sense to either serialize the snippet or enough > information that the snippet can be reconstructed. And if that can't be done, > or fails to satisfy some other use case, then we should discuss how we > proceed -- for instance, we could consider having different diagnostic > messages for the case where we have a snippet and for the case where we do > not. Right. There are places in the IDE where there is a condensed view of all diagnostics (like a Vim location list), and others where the diagnostics are shown inline with the sources. I think what we want is an optional auxiliary record/field in a diagnostic with that contains context for when the source context is missing, and then the IDE can choose which to display. It's optional because most diagnostics are good enough as is for location lists. Repository: rC Clang https://reviews.llvm.org/D46834 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits