[clangd][ObjC] Improve completions for protocols + category names
authorDavid Goldman <davg@google.com>
Wed, 31 Aug 2022 17:33:09 +0000 (13:33 -0400)
committerDavid Goldman <davg@google.com>
Thu, 8 Sep 2022 15:30:26 +0000 (11:30 -0400)
commite09c75049854fee251e99c4c3c55f3f391f52a10
tree54fde2f6a8b1ee3d5a10352f1cfe497b31e8c3af
parentec8f2905a33ba970543c8edb4141c47f30d325f7
[clangd][ObjC] Improve completions for protocols + category names

- Render protocols as interfaces to differentiate them from classes
  since a protocol and class can have the same name. Take this one step
  further though, and only recommend protocols in ObjC protocol completions.

- Properly call `includeSymbolFromIndex` even with a cached
  speculative fuzzy find request

- Don't use the index to provide completions for category names,
  symbols there don't make sense

Differential Revision: https://reviews.llvm.org/D132962
clang-tools-extra/clangd/CodeComplete.cpp
clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
clang-tools-extra/clangd/unittests/TestIndex.cpp
clang-tools-extra/clangd/unittests/TestIndex.h