hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
looks good.
================
Comment at: clangd/index/Merge.cpp:34
+ Dynamic->fuzzyFind(Ctx, Req, [&](const Symbol &S) { DynB.insert(S);
});
+ SymbolSlab Dyn = std::move(DynB).build();
+
----------------
sammccall wrote:
> hokein wrote:
> > IIUC, `Dyn` is a local variable, which holds all the underlying data of
> > `Symbol`, the `Symbol` returned in the callback of `fuzzyFind` would be
> > invalid after the `fuzzyFind(..)` function call is finished.
> >
> > Our previous assumption is that `Symbol` is valid as long as the
> > `SymbolIndex` exists?
> > Our previous assumption is that Symbol is valid as long as the SymbolIndex
> > exists?
>
> No, it's only valid for the callback. Valid for the life of the index would
> make life hard for remote indexes.
> Added documentation to SymbolIndex.
I see, that makes sense.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D42049
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits