[PATCH] D54427: [clangd] Allow symbols from AnyScope in dexp.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 12 07:46:36 PST 2018


ioeric added inline comments.


================
Comment at: clangd/index/dex/dexp/Dexp.cpp:55
   FuzzyFindRequest Request;
+  Request.AnyScope = true;
   // Remove leading "::" qualifier as FuzzyFind doesn't need leading "::"
----------------
I don't think you would want AnyScope here. For example, if `QualifiedName` is std::string, you can also get `llvm::StringRef` in the results.


================
Comment at: clangd/index/dex/dexp/Dexp.cpp:138
     Request.Query = Query;
+    Request.AnyScope = true;
     if (Scopes.getNumOccurrences() > 0) {
----------------
I think what you actually want is `Request.AnyScope = Scopes.empty()`? It doesn't seem useful to set AnyScope when scopes are provided.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D54427





More information about the cfe-commits mailing list