[PATCH] D42803: [clangd] Log dropped diagnostics.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 10:14:18 PST 2018


sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clangd/ClangdUnit.cpp:182
+  SmallString<64> Message;
+  D.FormatDiagnostic(Message);
+
----------------
does Message include file:line? we probably want that in the log line.


================
Comment at: clangd/ClangdUnit.cpp:186
+      !D.getSourceManager().isInMainFile(D.getLocation())) {
+    log("Ignored diagnostic outside main file: " + Twine(Message));
     return llvm::None;
----------------
Agree this is useful.

Have we turned off the diagnostics limit (or will we?) a misconfig of e.g. C vs C++ parsing of a header seems like it could produce 1000+ log lines from preamble that we should probably avoid somehow.
(Maybe even avoid paying to format)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D42803





More information about the cfe-commits mailing list