[PATCH] D54800: [clangd] Cleanup: stop passing around list of supported URI schemes.
Eric Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 21 07:27:39 PST 2018
ioeric created this revision.
ioeric added a reviewer: sammccall.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
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.)
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D54800
Files:
clangd/ClangdLSPServer.cpp
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/URI.cpp
clangd/URI.h
clangd/index/Background.cpp
clangd/index/Background.h
clangd/index/FileIndex.cpp
clangd/index/FileIndex.h
clangd/index/Serialization.cpp
clangd/index/Serialization.h
clangd/index/SymbolCollector.cpp
clangd/index/SymbolCollector.h
clangd/index/dex/Dex.cpp
clangd/index/dex/Dex.h
clangd/index/dex/dexp/Dexp.cpp
clangd/tool/ClangdMain.cpp
test/clangd/did-change-configuration-params.test
test/clangd/protocol.test
unittests/clangd/BackgroundIndexTests.cpp
unittests/clangd/CodeCompleteTests.cpp
unittests/clangd/DexTests.cpp
unittests/clangd/FileIndexTests.cpp
unittests/clangd/FindSymbolsTests.cpp
unittests/clangd/IndexTests.cpp
unittests/clangd/SymbolCollectorTests.cpp
unittests/clangd/TestTU.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54800.174928.patch
Type: text/x-patch
Size: 47260 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181121/48daa31a/attachment-0001.bin>
More information about the cfe-commits
mailing list