[PATCH] D100798: [clangd][ObjC] Fix issue completing a method decl by name

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 1 08:51:53 PDT 2021


sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Thanks for the detailed comments, this makes a lot more sense to me now!



================
Comment at: clang-tools-extra/clangd/CodeCompletionStrings.cpp:160
+          //
+          // e.g. to complete `- (void)doSomething:(id)argument`:
+          // - Completion name: `doSomething:`
----------------
Does completing the no-args declaration `- (void) foo` work as expected?

We never get to this part of the code in this case because endswith(":") is never true. The comment above says "safe to treat as c++" but not sure this is true for declaration, just method calls. Maybe it works for some other reason though?

In any case, it's OK if this case doesn't work (this patch still improves things a lot). We should probably have a test showing what the state is.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100798/new/

https://reviews.llvm.org/D100798



More information about the cfe-commits mailing list