| Issue |
109608
|
| Summary |
[Clang] Incomplete/incorrect code completion about explicit object member function
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
zwuis
|
Godbolt: <https://godbolt.org/z/EPaebdEx9>
```cpp
struct S {
void foo1() const;
void foo2();
void foo3(this const S& self);
void foo4(this S& self);
};
void S::foo1() const {
this-> // #1
}
void S::foo2() {
this-> // #2
}
void S::foo3(this const S& self) {
self. // #3
}
void S::foo4(this S& self) {
self. // #4
}
void test1(S s) {
s. // #5
}
void test2(const S s) {
s. // #6
}
```
Code completion results:
At `#1`, `#3` and `#6`: (missing `foo3`)
```txt
COMPLETION: foo1 : [#void#]foo1()[# const#]
COMPLETION: S : S::
```
---
At `#2`, `#4` and `#5`: (unexpected argument in `foo3` and `foo4`)
```txt
COMPLETION: foo1 : [#void#]foo1()[# const#]
COMPLETION: foo2 : [#void#]foo2()
COMPLETION: foo3 : [#void#]foo3(<#const S &self#>)
COMPLETION: foo4 : [#void#]foo4(<#S &self#>)
COMPLETION: operator= : [#S &#]operator=(<#const S &#>)
COMPLETION: operator= : [#S &#]operator=(<#S &&#>)
COMPLETION: S : S::
COMPLETION: ~S : [#void#]~S()
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs