[PATCH] D50727: [clangd] Fetch documentation from the Index during signature help

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 16 04:17:53 PDT 2018


ilya-biryukov added inline comments.


================
Comment at: clangd/CodeComplete.cpp:742
+    llvm::DenseMap<SymbolID, std::string> FetchedDocs;
+    if (Index) {
+      LookupRequest IndexRequest;
----------------
hokein wrote:
> nit: do we want to log anything here? It may be useful for debug.
Definitely useful. Thanks!


================
Comment at: clangd/index/Index.h:65
 public:
+  static llvm::Optional<SymbolID> forDecl(const Decl &D);
+
----------------
hokein wrote:
> We already have this similar function in clangd/AST.h.
Thanks for pointing this out.
It's somewhat hard to find. WDYT about moving it to `Index.h`? The concern would probably be a somewhat broken layering, right? E.g. `Index.h` should not directly depend on anything AST-specific


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D50727





More information about the cfe-commits mailing list