As of r266186, auto_diagnostic_group is now user-visible (via -fdiagnostics-format=json), so update the diagnostic guidelines accordingly.
Committed to trunk as r266187. gcc/ChangeLog: * doc/ux.texi (Group logically-related diagnostics): Move discussion of auto_diagnostic_group into this new subsection. Give an example of where this grouping is used. --- gcc/doc/ux.texi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/doc/ux.texi b/gcc/doc/ux.texi index 3b395f2..47b4492 100644 --- a/gcc/doc/ux.texi +++ b/gcc/doc/ux.texi @@ -376,12 +376,15 @@ where the @code{double} and @code{int} are colorized to highlight them. @c %H and %I were added in r248698. +@subsection Group logically-related diagnostics + Use @code{auto_diagnostic_group} when issuing multiple related diagnostics (seen in various examples on this page). This informs the diagnostic subsystem that all diagnostics issued within the lifetime -of the @code{auto_diagnostic_group} are related. (Currently it doesn't -do anything with this information, but we may implement that in the -future). +of the @code{auto_diagnostic_group} are related. For example, +@option{-fdiagnostics-format=json} will treat the first diagnostic +emitted within the group as a top-level diagnostic, and all subsequent +diagnostics within the group as its children. @subsection Quoting Text should be quoted by either using the @samp{q} modifier in a directive -- 1.8.5.3