Convert a first character of diagnostic message to uppercase

This commit is contained in:
Server 2021-07-05 18:31:07 +09:00
parent 8d38fb9841
commit 3fc5b19511

View File

@ -249,7 +249,10 @@ public:
info.FormatDiagnostic(message);
d.range =
fromCharSourceRange(sm, *langOpts, diagnosticRange(info, *langOpts));
d.message = message.str();
{
char upperCh[2] = { (char)std::toupper(message[0]), '\0' };
d.message = (StringRef(upperCh) + message.substr(1)).str();
}
d.concerned = concerned;
d.file = filename;
d.level = level;