Print diagnostic group names by default

Print diagnostic groups as part of the LLVM printer in the same manner as the
Swift one does, always. Make `-print-diagnostic-groups` an inert option, since we
always print diagnostic group names with the `[#GroupName]` syntax.

As part of this, we no longer render the diagnostic group name as part
of the diagnostic *text*, instead leaving it up to the diagnostic
renderer to handle the category appropriately. Update all of the tests
that were depending on `-print-diagnostic-groups` putting it into the
text to instead use the `{{documentation-file=<file name>}}`
diagnostic verification syntax.
This commit is contained in:
Doug Gregor
2025-03-29 15:37:10 -07:00
parent e88f8995e1
commit b182c96bd7
34 changed files with 320 additions and 325 deletions

View File

@@ -2559,8 +2559,6 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
}
if (Args.hasArg(OPT_debug_diagnostic_names)) {
Opts.PrintDiagnosticNames = PrintDiagnosticNamesMode::Identifier;
} else if (Args.hasArg(OPT_print_diagnostic_groups)) {
Opts.PrintDiagnosticNames = PrintDiagnosticNamesMode::Group;
}
if (Arg *A = Args.getLastArg(OPT_diagnostic_documentation_path)) {
Opts.DiagnosticDocumentationPath = A->getValue();