[PATCH] D40897: [clangd] Introduce a "Symbol" class.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 12 03:27:45 PST 2017


hokein added inline comments.


================
Comment at: clangd/index/Index.cpp:34
+
+SymbolSlab::const_iterator SymbolSlab::find(const SymbolID& SymID) const {
+  return Symbols.find(SymID);
----------------
sammccall wrote:
> assert frozen? (and in begin())
We may not do the assert "frozen" in these getter methods -- as writers may also have needs to access these APIs (e.g. checking whether SymbolID is already in the slab before constructing and inserting a new Symbol).


================
Comment at: clangd/index/SymbolCollector.h:35
+
+  StringRef getFilename() const {
+    return Filename;
----------------
sammccall wrote:
> What's this for? Seems like we should be able to handle multiple TUs with one collector?
We don't have particular usage for this method except for testing. Removed it.  


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D40897





More information about the cfe-commits mailing list