[PATCH] D100798: [clangd][ObjC] Fix issue completing a method decl by name
David Goldman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 1 10:31:17 PDT 2021
dgoldman marked an inline comment as done.
dgoldman added inline comments.
================
Comment at: clang-tools-extra/clangd/CodeCompletionStrings.cpp:160
+ //
+ // e.g. to complete `- (void)doSomething:(id)argument`:
+ // - Completion name: `doSomething:`
----------------
sammccall wrote:
> 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.
Yeah, it does. I added a test case for it, it does work, the current behavior is fine, the issue for ObjC is specifically selectors with arguments.
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