This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Introduced Logger interface.
ClosedPublic

Authored by ilya-biryukov on Sep 18 2017, 6:34 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ilya-biryukov created this revision.Sep 18 2017, 6:34 AM

Looks very nice! Just a few questions.

clangd/ClangdServer.h
24 ↗(On Diff #115634)

forward declare?

clangd/ClangdUnit.h
13 ↗(On Diff #115634)

forward declare?

clangd/GlobalCompilationDatabase.cpp
88 ↗(On Diff #115634)

Will this log for every parent folder that doesn't contain the compilation database? I haven't tried to confirm. Just wondering because it could get very spammy.

clangd/GlobalCompilationDatabase.h
13 ↗(On Diff #115634)

forward declare instead?

ilya-biryukov marked 4 inline comments as done.

Addressed review comments.

  • Replaced include with forward declaration in headers.
  • Removed logging on each call to loadFromDirectory.
clangd/GlobalCompilationDatabase.cpp
88 ↗(On Diff #115634)

You're totally right, it's incredibly spammy. I've removed logging from this line.
Thanks for the finding!

  • Replaced JSONOutput in Protocol.h/Protocol.cpp with Logger.
malaperle accepted this revision.Sep 19 2017, 6:03 AM

Look good. Thank you!

This revision is now accepted and ready to land.Sep 19 2017, 6:03 AM
This revision was automatically updated to reflect the committed changes.