[PATCH] D52078: [clangd] Store preamble macros in dynamic index.
Eric Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 14 04:38:59 PDT 2018
ioeric added inline comments.
================
Comment at: clangd/index/FileIndex.cpp:84
+ Merged.insert(Macro);
+ for (const auto &Sym : Collector.takeSymbols())
+ Merged.insert(Sym);
----------------
ilya-biryukov wrote:
> Why make an extra copy of the symbols? Why not add macros to the same builder used in collector?
`index::indexTopLevelDecls` will re-`initialize` the collector. This is safe with the current implementation, but I can imagine it goes wrong when we do more cleanup in the initialization.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D52078
More information about the cfe-commits
mailing list