[PATCH] D44882: [clangd] Implementation of workspace/symbol request

Marc-Andre Laperle via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 29 11:00:07 PDT 2018


malaperle added inline comments.


================
Comment at: clangd/FindSymbols.cpp:31
+
+  if (supportedSymbolKinds &&
+      std::find(supportedSymbolKinds->begin(), supportedSymbolKinds->end(),
----------------
MaskRay wrote:
> This std::find loop adds some overhead to each candidate... In my experience the client usually doesn't care about the returned symbol kinds, they are used to give a category name. You can always patch the upstream to add missing categories.
> 
> This is one instance where LSP is over specified. nvm I don't have strong opinion here
I have a client that throws an exception when the symbolkind is not known and the whole request fails, so I think it's worth checking. But if it's too slow I can look at making it faster. Unfortunately, I cannot patch any upstream project :)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D44882





More information about the cfe-commits mailing list