[PATCH] D53687: [clangd] Make in-memory CDB always available as an overlay, refactor.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 24 20:39:39 PDT 2018


sammccall created this revision.
sammccall added a reviewer: ilya-biryukov.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric.

The new implementation is a GlobalCompilationDatabase that overlays a base.
Normally this is the directory-based CDB.
To preserve the behavior of compile_args_from=LSP, the base may be null.

The OverlayCDB is always present, and so the extensions to populate it
are always supported.

It also allows overriding the flags of the fallback command. This is
just unit-tested for now, but the plan is to expose this as an extension
on the initialize message. This addresses use cases like
https://github.com/thomasjo/atom-ide-cpp/issues/16


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53687

Files:
  clangd/ClangdLSPServer.cpp
  clangd/ClangdLSPServer.h
  clangd/GlobalCompilationDatabase.cpp
  clangd/GlobalCompilationDatabase.h
  unittests/clangd/GlobalCompilationDatabaseTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53687.171034.patch
Type: text/x-patch
Size: 13067 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181025/a177299e/attachment-0001.bin>


More information about the cfe-commits mailing list