[PATCH] D143436: [clangd] Apply standard adaptors to CDBs pushed from LSP

Dmitry Polukhin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 6 14:39:42 PST 2023


DmitryPolukhin created this revision.
DmitryPolukhin added reviewers: sammccall, ilya-biryukov.
DmitryPolukhin added projects: clang, clang-tools-extra.
Herald added subscribers: s.egerton, kadircet, arphaman, simoncook.
Herald added a project: All.
DmitryPolukhin requested review of this revision.
Herald added subscribers: pcwang-thead, MaskRay.

There is a discrepancy between how clangd processes CDB loaded from
JSON file on disk and pushed via LSP. This the same CDB pushed via
LSP protocol may not work as expected. I think there is no fundamental
difference between these CDB loaded from JSON and pushed via LSP.
This diff extracts adaptors application into a separate function and
calls it in both cases.

Test Plan: check-clang-tools


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143436

Files:
  clang-tools-extra/clangd/ClangdLSPServer.cpp
  clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
  clang-tools-extra/clangd/GlobalCompilationDatabase.h
  clang-tools-extra/clangd/test/did-change-configuration-params.test
  clang/include/clang/Tooling/CompilationDatabase.h
  clang/lib/Tooling/CompilationDatabase.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143436.495279.patch
Type: text/x-patch
Size: 5953 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230206/be7496e9/attachment.bin>


More information about the cfe-commits mailing list