[clang] [clang-tools-extra] [clang][CodeComplete] skip explicit obj param in SignatureHelp (PR #146649)
Mythreya Kuricheti via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 3 02:36:40 PDT 2025
MythreyaK wrote:
The completion for `(&A::foo2)` is just `(A, int)`, not `foo(A, int)`. I tried to add a test case, like in this [godbolt](https://godbolt.org/z/77zE7e3oE) example,
```cpp
struct A {
void foo1(this A self, int arg) {}
template <typename T>
void foo2(this T&& self, int arg, float arg2) {}
};
int main() {
A a {};
(&A::foo1)(a, 1);
(&A::foo2<A&>)(a, 1, 3.4); // possible?
// (&A::foo2<A&>)(a, 1 /* , 3.4*/); // causes a compiler crash
return 0;
}
```
but causes a crash ([example](https://godbolt.org/z/oo198z8Gh)). So I haven't added those cases, but left a `TODO`. Should I leave a `TODO: PR 146649` instead?
https://github.com/llvm/llvm-project/pull/146649
More information about the cfe-commits
mailing list