ioeric added inline comments.

================
Comment at: clangd/index/SymbolCollector.cpp:555
+  auto Loc = findNameLoc(&ND);
+  if (!shouldIndexFile(SM, SM.getFileID(Loc), Opts, &FilesToIndexCache))
+    return nullptr;
----------------
Should we use `getTokenLocation` like what we do below?


================
Comment at: clangd/index/SymbolCollector.cpp:614
 
-void SymbolCollector::addDefinition(const NamedDecl &ND,
-                                    const Symbol &DeclSym) {
-  if (DeclSym.Definition)
+void SymbolCollector::addDefinition(const NamedDecl &ND, SymbolID ID,
+                                    const Symbol *DeclSym) {
----------------
IIUC, if `D` is declared in d.h that is filtered out and defined in d.cc that 
is not filtered, this would only create a basic symbol with definition? 

I think what we want is a full symbol with declaration, definition, includes 
etc. This is one assumption we make in order for the merging in auto-index to 
work.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D54300



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

Reply via email to