[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 14 02:43:04 PST 2017
sammccall accepted this revision.
sammccall added inline comments.
================
Comment at: unittests/clangd/IndexTests.cpp:29
+
+struct SlabAndPointers {
+ SymbolSlab Slab;
----------------
this could be local to generateNumSymbols, up to you
================
Comment at: unittests/clangd/IndexTests.cpp:51
+
+ auto Symbols = std::shared_ptr<std::vector<const Symbol *>>(std::move(Slab),
+ &Slab->Pointers);
----------------
nit: just return? (you can skip spelling out the shared_ptr type with {}, I think)
================
Comment at: unittests/clangd/IndexTests.cpp:73
+ EXPECT_THAT(match(I, Req), UnorderedElementsAre("7"));
+
+ // Release old symbols.
----------------
assert symbols is not expired here?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D40548
More information about the cfe-commits
mailing list