This revision was automatically updated to reflect the committed changes.
Closed by commit rL344507: [clangd] Fix some references missing in dynamic
index. (authored by hokein, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D53273
Files:
hokein updated this revision to Diff 169671.
hokein marked an inline comment as done.
hokein added a comment.
avoid calling shouldCollectSymbol every time during indexing.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53273
Files:
clangd/index/SymbolCollector.cpp
unittests
hokein added inline comments.
Comment at: clangd/index/SymbolCollector.cpp:348
+ if (!shouldCollectSymbol(*ND, *ASTCtx, Opts))
+return true;
sammccall wrote:
> This seems better for the main-AST case, but substantially more expensive for
> indexing preamb
sammccall added a comment.
Nice fix, just performance concerns.
(I do think this might be significant, but measuring dynamic index time
before/after for a big TU might show this to be unimportant)
Comment at: clangd/index/SymbolCollector.cpp:348
+ if (!shouldCollectSymbol(
hokein created this revision.
hokein added a reviewer: sammccall.
Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric,
ilya-biryukov.
Previously, SymbolCollector postfilters all references at the end to
find all references of interesting symbols.
It was incorrect when indxing m