-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Clang] Incomplete/incorrect code completion about explicit object member function #109608
Comments
@llvm/issue-subscribers-clang-frontend Author: Yanzuo Liu (zwuis)
Godbolt: <https://godbolt.org/z/EPaebdEx9>
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 COMPLETION: foo1 : [#void#]foo1()[# const#]
COMPLETION: S : S:: At 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/issue-subscribers-clangd Author: Yanzuo Liu (zwuis)
Godbolt: <https://godbolt.org/z/EPaebdEx9>
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 COMPLETION: foo1 : [#void#]foo1()[# const#]
COMPLETION: S : S:: At 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() |
I’m interested in this issue. Could you please assign it to me? :) |
Godbolt: https://godbolt.org/z/EPaebdEx9
Code completion results:
At
#1
,#3
and#6
: (missingfoo3
)At
#2
,#4
and#5
: (unexpected argument infoo3
andfoo4
)The text was updated successfully, but these errors were encountered: