[clang-tools-extra] r345968 - [clangd] Only log ignored diagnostics with -log=verbose.
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 2 05:51:26 PDT 2018
Author: sammccall
Date: Fri Nov 2 05:51:26 2018
New Revision: 345968
URL: http://llvm.org/viewvc/llvm-project?rev=345968&view=rev
Log:
[clangd] Only log ignored diagnostics with -log=verbose.
Reviewers: ilya-biryukov
Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D53648
Modified:
clang-tools-extra/trunk/clangd/Compiler.cpp
Modified: clang-tools-extra/trunk/clangd/Compiler.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Compiler.cpp?rev=345968&r1=345967&r2=345968&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Compiler.cpp (original)
+++ clang-tools-extra/trunk/clangd/Compiler.cpp Fri Nov 2 05:51:26 2018
@@ -20,6 +20,7 @@ namespace clangd {
void IgnoreDiagnostics::log(DiagnosticsEngine::Level DiagLevel,
const clang::Diagnostic &Info) {
+ // FIXME: format lazily, in case vlog is off.
SmallString<64> Message;
Info.FormatDiagnostic(Message);
@@ -32,7 +33,7 @@ void IgnoreDiagnostics::log(DiagnosticsE
OS << ":";
}
- clangd::log("Ignored diagnostic. {0}{1}", Location, Message);
+ clangd::vlog("Ignored diagnostic. {0}{1}", Location, Message);
}
void IgnoreDiagnostics::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
More information about the cfe-commits
mailing list