DiagnosticEngine: Print the ID of the wrapped, not wrapper, diagnostic

This commit is contained in:
Anthony Latsis
2025-03-11 00:45:34 +00:00
parent 012ac5da5d
commit 77e673a723
8 changed files with 215 additions and 81 deletions

View File

@@ -1086,7 +1086,7 @@ public:
// Emit a specific unavailable message when we know why a decl can't be
// exposed, or a generic message otherwise.
auto diagString =
M.getASTContext().Diags.diagnosticStringFor(diag.getID());
M.getASTContext().Diags.getFormatStringForDiagnostic(diag.getID());
DiagnosticEngine::formatDiagnosticText(os, diagString, diag.getArgs(),
DiagnosticFormatOptions());
os << "\");\n";