[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 5 12:17:54 PDT 2018


kbobyrev added inline comments.


================
Comment at: clang-tools-extra/unittests/clangd/DexIndexTests.cpp:623
+
+  auto I = DexIndex::build(std::move(Builder).build(), URISchemes);
+
----------------
ioeric wrote:
> We could use the constructor that doesn't take ownership e.g. `DexIndex({Sym1, Sym2}, URISchemes)`
That would try to convert `{Sym1, Sym2}` to `SymbolSlab` and that's not possible. IIUC your suggestion is about using the constructor with ranges:

```
template <typename Range>
DexIndex(Range &&Symbols, llvm::ArrayRef<std::string> URISchemes)
```

I could use `llvm::make_range(begin(Symbols), end(Symbols))`, but then I'd have to put everything into `Symbols` container first and that might be the same amount of code. I'm not sure that would be better than having a `Builder`. Did I miss something?


https://reviews.llvm.org/D51481





More information about the cfe-commits mailing list