[clangd] Fix use-after-free in ProjectAwareIndex tests

This commit is contained in:
Kadir Cetinkaya 2020-11-22 21:29:45 +01:00
parent cab3136807
commit 655360096f
No known key found for this signature in database
GPG Key ID: E39E36B8D2057ED6
1 changed files with 3 additions and 3 deletions

View File

@ -27,9 +27,9 @@ using testing::ElementsAre;
using testing::IsEmpty;
std::unique_ptr<SymbolIndex> createIndex() {
std::vector<Symbol> Symbols = {symbol("1")};
return std::make_unique<MemIndex>(std::move(Symbols), RefSlab(),
RelationSlab());
SymbolSlab::Builder Builder;
Builder.insert(symbol("1"));
return MemIndex::build(std::move(Builder).build(), RefSlab(), RelationSlab());
}
TEST(ProjectAware, Test) {