Skip to content

Generate definition/declaration from undefined function usage #13427

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

Open
Omcsesz opened this issue Mar 26, 2025 · 3 comments
Open

Generate definition/declaration from undefined function usage #13427

Omcsesz opened this issue Mar 26, 2025 · 3 comments

Comments

@Omcsesz
Copy link

Omcsesz commented Mar 26, 2025

Feature Request

Hello, team!

I would like to request the following addition to the "Create declaration/definition" functionality: it would be useful if it could generate the declaration/definition where an undefined function is called (#13425)

Image

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Mar 26, 2025

@Omcsesz That doesn't seem possible to me -- if it's undefined, then we don't know what signature to use to create it, right? Or am I misunderstanding something (I didn't read the linked thread). The reason create declaration/definition works is that it has one of either the declaration or definition and it uses that info to create the other one.

@sean-mcmanus sean-mcmanus self-assigned this Mar 26, 2025
@sean-mcmanus sean-mcmanus added Feature Request more info needed The issue report is not actionable in its current state Feature: Create Declaration or Definition labels Mar 26, 2025
@Omcsesz
Copy link
Author

Omcsesz commented Mar 26, 2025

@sean-mcmanus What I thought is that it could take the parameter list of the undefined function at the place of it's call, and the return value could be the same as the type of the variable it is assigned to. I don't know if this could be realized.

@bobbrow
Copy link
Member

bobbrow commented Mar 26, 2025

As part of the lightbulb we could also provide choices to make it a free function or a member function (if currently within a member function).

@bobbrow bobbrow changed the title additional feature related to "Create declaration/definition" Generate definition/declaration from undefined function usage Mar 26, 2025
@sean-mcmanus sean-mcmanus removed the more info needed The issue report is not actionable in its current state label Mar 27, 2025
@sean-mcmanus sean-mcmanus removed their assignment Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants