This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Also accept flags from CLANGD_FLAGS variable.
ClosedPublic

Authored by sammccall on Jul 23 2019, 8:08 AM.

Details

Summary

This simplifies various workflows, particularly in debugging/development.
e.g. editors will tend to propagate flags, so you can run
env CLANGD_FLAGS=-input-mirror-file=/tmp/mirror vim foo.cc rather than change
the configuration in a persistent way.
(This also gives us a generic lever when we don't know how to customize the
flags in some particular LSP client).

While here, add a test for this and other startup logging, and fix a couple
of direct writes to errs() that should have been logs.

Diff Detail

Repository
rL LLVM

Event Timeline

sammccall created this revision.Jul 23 2019, 8:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 23 2019, 8:08 AM
hokein accepted this revision.Jul 25 2019, 12:29 AM
hokein added inline comments.
clang-tools-extra/clangd/test/log.test
9 ↗(On Diff #211307)

nit: remove the extra trailing blank line?

This revision is now accepted and ready to land.Jul 25 2019, 12:29 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2019, 12:56 AM