diff options
| author | Eric Liu <ioeric@google.com> | 2018-11-22 15:02:05 +0000 |
|---|---|---|
| committer | Eric Liu <ioeric@google.com> | 2018-11-22 15:02:05 +0000 |
| commit | c0ac4bb17cb88956a0e12eedfbfc237ec532249b (patch) | |
| tree | 64e0405774de656f361408472d1bb4b7b93b1119 /clang-tools-extra/clangd/ClangdServer.cpp | |
| parent | 5628c1455f0dc69d9691ecb7fda0c83e7dee5af9 (diff) | |
| download | bcm5719-llvm-c0ac4bb17cb88956a0e12eedfbfc237ec532249b.tar.gz bcm5719-llvm-c0ac4bb17cb88956a0e12eedfbfc237ec532249b.zip | |
[clangd] Cleanup: stop passing around list of supported URI schemes.
Summary:
Instead of passing around a list of supported URI schemes in clangd, we
expose an interface to convert a path to URI using any compatible scheme
that has been registered. It favors customized schemes and falls
back to "file" when no other scheme works.
Changes in this patch are:
- URI::create(AbsPath, URISchemes) -> URI::create(AbsPath). The new API finds a
compatible scheme from the registry.
- Remove URISchemes option everywhere (ClangdServer, SymbolCollecter, FileIndex etc).
- Unit tests will use "unittest" by default.
- Move "test" scheme from ClangdLSPServer to ClangdMain.cpp, and only
register the test scheme when lit-test or enable-lit-scheme is set.
(The new flag is added to make lit protocol.test work; I wonder if there
is alternative here.)
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D54800
llvm-svn: 347467
Diffstat (limited to 'clang-tools-extra/clangd/ClangdServer.cpp')
| -rw-r--r-- | clang-tools-extra/clangd/ClangdServer.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp index 8da5dec414f..8d925d7cdca 100644 --- a/clang-tools-extra/clangd/ClangdServer.cpp +++ b/clang-tools-extra/clangd/ClangdServer.cpp @@ -106,8 +106,7 @@ ClangdServer::ClangdServer(const GlobalCompilationDatabase &CDB, ResourceDir(Opts.ResourceDir ? *Opts.ResourceDir : getStandardResourceDir()), DynamicIdx(Opts.BuildDynamicSymbolIndex - ? new FileIndex(Opts.URISchemes, - Opts.HeavyweightDynamicSymbolIndex) + ? new FileIndex(Opts.HeavyweightDynamicSymbolIndex) : nullptr), WorkspaceRoot(Opts.WorkspaceRoot), PCHs(std::make_shared<PCHContainerOperations>()), |

