[PATCH] D98029: [clangd] Introduce a CommandLineConfigProvider

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 5 03:16:09 PST 2021


kadircet created this revision.
kadircet added a reviewer: sammccall.
Herald added subscribers: usaxena95, arphaman.
kadircet requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang.

This enables unifying command line flags with config options in clangd
internals. This patch changes behaviour in 2 places:

- BackgroundIndex was previously disabled when -remote-index was

provided. After this patch, it will be enabled but all files will have
bkgindex policy set to Skip.

- -index-file was loaded at startup (at least load was initiated), now

the load will happen through ProjectAwareIndex with first index query.

Unfortunately this doesn't simplify any options initially, as

- CompileCommandsDir is also used by clangd --check workflow, which

doesn't use configs.

- EnableBackgroundIndex option controls whether the component will be

created at all, which implies creation of extra threads registering a
listener for compilation database discoveries.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98029

Files:
  clang-tools-extra/clangd/ClangdLSPServer.cpp
  clang-tools-extra/clangd/test/log.test
  clang-tools-extra/clangd/tool/ClangdMain.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98029.328466.patch
Type: text/x-patch
Size: 7356 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210305/104288f4/attachment-0001.bin>


More information about the cfe-commits mailing list