From 3fc5b19511b7c5e8607a5f5f39e640317764d586 Mon Sep 17 00:00:00 2001 From: Server Date: Mon, 5 Jul 2021 18:31:07 +0900 Subject: [PATCH] Convert a first character of diagnostic message to uppercase --- src/sema_manager.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sema_manager.cc b/src/sema_manager.cc index dca5b03b..ecdbe0ed 100644 --- a/src/sema_manager.cc +++ b/src/sema_manager.cc @@ -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;