On Thu, Sep 12, 2024 at 11:12:26AM -0400, David Malcolm wrote: > We were chatting on IRC about how it would be nice to be able to use > %qs in libcppp diagnostics; here is an example (rather than using > \"%s\").
Yeah, I'm working on a patch for that. > Not a blocker, but it occurs to me that ideally we'd group the warning > and note into a diagnostic group, but unfortunately there's no way to > express that currently via the interface libcpp has. We would need to > add {begin,end}_group hooks, which in turn suggests that maybe that > libcpp's interface into diagnostics should be an abstract base class > with various vfuncs, rather than a callback. I haven't added auto_diagnostic_group because nothing in libcpp does that, yes, we need some solution for that. > Also not a blocker, but it would nice to have a fix-it hint here, by > using the rich_location overload of cpp_error_at and adding a fix-it > hint to the rich_location. And yes, I was thinking about fix-it hint, but I think that depends on better locations there first, currently the patch uses just the lines with the directives. I was hoping that can be done incrementally. Jakub