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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to