This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Log all ignored diagnostics.
ClosedPublic

Authored by ilya-biryukov on Feb 9 2018, 5:29 AM.

Details

Summary

To aid debugging failures and crashes.
Only part of ignored diagnostics was logged before, now we log all of
them.

Diff Detail

Repository
rL LLVM

Event Timeline

ilya-biryukov created this revision.Feb 9 2018, 5:29 AM
hokein added inline comments.Feb 12 2018, 1:14 AM
clangd/ClangdUnit.cpp
197 ↗(On Diff #133591)

I'm not sure, do we care about this particular case (diagnostic outside main file)? With the new change, we don't know whether the diag is from main file or outside main file。

clangd/Compiler.h
27 ↗(On Diff #133591)

maybe just name it log? since this method is already in IgnoreDiagnostics class.

ilya-biryukov marked an inline comment as done.
  • Renamed logIgnoredDiag to log.
clangd/ClangdUnit.cpp
197 ↗(On Diff #133591)

We probably don't.
We output the location of the diagnostic anyway, so there should always be enough context when looking at the logs.

hokein accepted this revision.Feb 12 2018, 4:28 AM

LGTM.

clangd/ClangdUnit.cpp
197 ↗(On Diff #133591)

Ah, make sense.

This revision is now accepted and ready to land.Feb 12 2018, 4:28 AM
This revision was automatically updated to reflect the committed changes.