This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Log dropped diagnostics.
ClosedPublic

Authored by ilya-biryukov on Feb 1 2018, 8:50 AM.

Details

Summary

clangd drops diagnostics coming outside the main file, but it is still
useful to see that something went wrong in the logs.

Diff Detail

Event Timeline

ilya-biryukov created this revision.Feb 1 2018, 8:50 AM
sammccall accepted this revision.Feb 1 2018, 10:13 AM
sammccall added inline comments.
clangd/ClangdUnit.cpp
183

does Message include file:line? we probably want that in the log line.

187

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)

This revision is now accepted and ready to land.Feb 1 2018, 10:13 AM
  • Show location of dropped diagnostic.
clangd/ClangdUnit.cpp
183

No, it didn't include the line before. Now dumping the location too.

187

I don't think we have changed default clang behavior.
This look like a good use-case for introducing log levels.
This information is definitely too verbose most of the time, but very useful when debugging failures

This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.