This revision was automatically updated to reflect the committed changes.
sammccall marked an inline comment as done.
Closed by commit rCTE341368: [clangd] SymbolOccurrences -> Refs and cleanup
(authored by sammccall, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D51605?vs=1
hokein accepted this revision.
hokein added a comment.
LGTM, thanks!
Comment at: clangd/index/FileIndex.cpp:120
+ auto &SymRefs = Sym.second;
+ std::sort(SymRefs.begin(), SymRefs.end());
+ std::copy(SymRefs.begin(), SymRefs.end(), back_inserter(RefsStorage));
---
sammccall marked an inline comment as done.
sammccall added inline comments.
Comment at: clangd/index/Index.cpp:158
+auto &SymRefs = Sym.second;
+std::sort(SymRefs.begin(), SymRefs.end());
+// TODO: do we really need to dedup?
lebedev.ri wrote:
> I no
lebedev.ri added inline comments.
Comment at: clangd/index/Index.cpp:158
+auto &SymRefs = Sym.second;
+std::sort(SymRefs.begin(), SymRefs.end());
+// TODO: do we really need to dedup?
I noticed this by accident, but i'm pretty sure `std::sort()` shoul
sammccall updated this revision to Diff 163784.
sammccall marked 4 inline comments as done.
sammccall added a comment.
Address comments
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51605
Files:
clangd/ClangdServer.cpp
clangd/index/FileIndex.cpp
clangd/index/FileIndex.h
sammccall marked 7 inline comments as done.
sammccall added a comment.
In https://reviews.llvm.org/D51605#1222636, @hokein wrote:
> Thanks for cleaning it up! I admit that `SymbolOccurrences` is a loong name.
> A few nits.
Yeah, I hope you don't mind! The references stuff is awesome, I'm hopin
ioeric accepted this revision.
ioeric added a comment.
This revision is now accepted and ready to land.
nice!
Comment at: clangd/index/Index.cpp:153
+ // We can reuse the arena, as it only has unique strings and we need them
all.
+ // Reallocate the ref lists on the arena to
hokein added a comment.
Thanks for cleaning it up! I admit that `SymbolOccurrences` is a loong name. A
few nits.
Comment at: clangd/index/FileIndex.cpp:120
+ auto &SymRefs = Sym.second;
+ std::sort(SymRefs.begin(), SymRefs.end());
+ std::copy(SymRefs.begin(), Sy
sammccall updated this revision to Diff 163751.
sammccall added a comment.
Remove RefsSlab::find()
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51605
Files:
clangd/ClangdServer.cpp
clangd/index/FileIndex.cpp
clangd/index/FileIndex.h
clangd/index/Index.cpp
clangd/ind
sammccall created this revision.
sammccall added a reviewer: ioeric.
Herald added subscribers: cfe-commits, kadircet, arphaman, mgrang, jkorous,
MaskRay, ilya-biryukov.
A few things that I noticed while merging the SwapIndex patch:
- SymbolOccurrences and particularly SymbolOccurrenceSlab are un
10 matches
Mail list logo