[PATCH] D53648: [clangd] Only log ignored diagnostics with -log=verbose.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 2 05:54:48 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL345968: [clangd] Only log ignored diagnostics with -log=verbose. (authored by sammccall, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D53648

Files:
  clang-tools-extra/trunk/clangd/Compiler.cpp


Index: clang-tools-extra/trunk/clangd/Compiler.cpp
===================================================================
--- clang-tools-extra/trunk/clangd/Compiler.cpp
+++ clang-tools-extra/trunk/clangd/Compiler.cpp
@@ -20,6 +20,7 @@
 
 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 @@
     OS << ":";
   }
 
-  clangd::log("Ignored diagnostic. {0}{1}", Location, Message);
+  clangd::vlog("Ignored diagnostic. {0}{1}", Location, Message);
 }
 
 void IgnoreDiagnostics::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53648.172340.patch
Type: text/x-patch
Size: 731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181102/b9b65cc4/attachment.bin>


More information about the cfe-commits mailing list