[PATCH] D53019: [clangd] dump xrefs information in dexp tool.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 15 03:32:37 PDT 2018


sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clangd/index/dex/dexp/Dexp.cpp:61
+  Request.Scopes.emplace_back();
+  std::tie(Request.Scopes.back(), Request.Query) =
+      clang::clangd::splitQualifiedName(QualifiedName);
----------------
Are you sure you want both `foo` to mean `::foo` only, rather than accept any scope and the user can type `::foo` for explicitly global scope?


================
Comment at: clangd/index/dex/dexp/Dexp.cpp:64
+  std::vector<clang::clangd::SymbolID> SymIDs;
+  // We choose the first one if there are overloaded symbols.
+  Index->fuzzyFind(Request, [&](const Symbol &Sym) {
----------------
stale comment


================
Comment at: clangd/index/dex/dexp/Dexp.cpp:180
+    }
+    else {
+      IDs = getSymbolIDsFromIndex(Name, Index);
----------------
clang-format


================
Comment at: clangd/index/dex/dexp/Dexp.cpp:185
     clang::clangd::LookupRequest Request;
-    Request.IDs = {*SID};
+    Request.IDs.insert(IDs.begin(), IDs.end());
     bool FoundSymbol = false;
----------------
(nit: why not just initialize in place above?)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53019





More information about the cfe-commits mailing list