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

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 24 07:59:55 PDT 2018


sammccall created this revision.
sammccall added a reviewer: ilya-biryukov.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric.

Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53648

Files:
  clangd/Compiler.cpp


Index: clangd/Compiler.cpp
===================================================================
--- clangd/Compiler.cpp
+++ 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.170894.patch
Type: text/x-patch
Size: 659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181024/da20d99f/attachment.bin>


More information about the cfe-commits mailing list