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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to