[all-commits] [llvm/llvm-project] 4f1bbc: [clangd] Introduce a CommandLineConfigProvider

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Thu Mar 11 04:37:11 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4f1bbc0b842621d2048ed8687e328e2eab375b0a
      https://github.com/llvm/llvm-project/commit/4f1bbc0b842621d2048ed8687e328e2eab375b0a
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2021-03-11 (Thu, 11 Mar 2021)

  Changed paths:
    M clang-tools-extra/clangd/ClangdLSPServer.cpp
    M clang-tools-extra/clangd/ClangdLSPServer.h
    M clang-tools-extra/clangd/test/log.test
    M clang-tools-extra/clangd/tool/Check.cpp
    M clang-tools-extra/clangd/tool/ClangdMain.cpp

  Log Message:
  -----------
  [clangd] Introduce a CommandLineConfigProvider

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.

Differential Revision: https://reviews.llvm.org/D98029




More information about the All-commits mailing list