-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
[clangd] Incorrect navigation caused by deducing this #116335
Comments
@llvm/issue-subscribers-clangd Author: dayDreamingSaltyFish (ymyh)
```c++
struct B
{
template<typename Self>
auto bar(this Self &&)
{
return 0;
}
}; struct A auto baz(int n) int main()
}
|
Slightly reduced: struct S
{
int bar(this S&);
};
int main()
{
S waldo;
int x = waldo.bar();
} Go-to-def on |
Here is a SelectionTree trace:
|
Basically, the hit-testing algorithm skips the |
Let's start by seeing if we can get this fixed upstream in the AST: #116928 |
…ject parameter The explicit object parameter is written before the callee expression, so the begin location should come from the explicit object parameter. Fixes llvm#116335
incorrect navigation of a.foo and a to baz, a2.foo and a2 to n
The text was updated successfully, but these errors were encountered: