Skip to content
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

"Go to definitions" with templates #113

Open
Volker-Weissmann opened this issue Jan 23, 2021 · 1 comment
Open

"Go to definitions" with templates #113

Volker-Weissmann opened this issue Jan 23, 2021 · 1 comment

Comments

@Volker-Weissmann
Copy link

I (sadly) have a lot of code that looks like this:

template<class C>
void func(C arg) {
	arg.member();
}

obviously ccls cannot find the definition of member(). Is it possible to have ccls (or similar software) give me a list of methods called member, that are methods of a class that is used to instantiate func?

@Trass3r
Copy link

Trass3r commented Jan 23, 2021

I guess this quickly becomes really complicated, see clangd/clangd#493.
At the very least you need global analysis to find all instantiations. And then implement something like Typescript's union types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants