This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Print .clang-tidy configuration parsing errors using [ev]?log.
ClosedPublic

Authored by njames93 on Dec 16 2020, 5:37 PM.

Details

Summary

Currently warnings when parsing .clang-tidy are printed directly to errs.
This is less than ideal as there is no synchronisation printing to errs, leading to potential races.

Diff Detail

Event Timeline

njames93 created this revision.Dec 16 2020, 5:37 PM
njames93 requested review of this revision.Dec 16 2020, 5:37 PM
sammccall accepted this revision.Dec 17 2020, 9:35 AM

Nice! From here it seems like mostly a question of plumbing/refactoring on the clangd side to be able to surface these diagnostics, similar to how you did it with config files.

At some point, particularly if we also support .clang-format files, it might even be worth reconsidering if there's a lightweight way to become a language-server for such files. Less in order to provide quickfixes and code completion (which would be huge effort), and more to be able to surface diagnostics for files that are opened in the editor (rather than waiting until clangd tries to parse them for some other reason)

This revision is now accepted and ready to land.Dec 17 2020, 9:35 AM