[PATCH] D82354: [clangd] Implement RepoScheme for portable URIs

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 22 23:57:17 PDT 2020


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

This is not a complete patch, but rather RFC: while the schema implementation
itself does not seem very complicated it likely requires changes to the way we
keep track of available schemas. Right now, llvm::Registry allows to
.instantiate() found schemas but non of the existing ones require parameters.
For the portable URI schema we do need to understand where the project is and
hence it would require some internal stored parameters.

One way of dealing with it would be exposing a singleton that would store those
parameters assuming there could be only one RepoScheme at a time. This does not
look very nice from my perspective since it'd be a part of some global state
but it would do the trick.

What do you think?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82354

Files:
  clang-tools-extra/clangd/URI.cpp
  clang-tools-extra/clangd/URI.h
  clang-tools-extra/clangd/unittests/URITests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82354.272628.patch
Type: text/x-patch
Size: 5097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200623/77c5cc41/attachment-0001.bin>


More information about the cfe-commits mailing list