[PATCH] D46834: [Sema][Cxx17] Error message for C++17 static_assert(pred) without string literal
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 16 18:34:08 PDT 2018
dexonsmith added a comment.
In https://reviews.llvm.org/D46834#1102407, @rsmith wrote:
> In https://reviews.llvm.org/D46834#1102395, @dexonsmith wrote:
>
> > In https://reviews.llvm.org/D46834#1102391, @rsmith wrote:
> >
> > > 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.
>
>
> That sounds good to me. I think it would also make sense to use the alternate form for the CLI case if the user is using `-fno-caret-diagnostics` for some reason.
Yes that sounds right.
Repository:
rC Clang
https://reviews.llvm.org/D46834
More information about the cfe-commits
mailing list