microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.45k stars 1.53k forks source link

The Parameter hints does not suggest the best match #2206

Open lh123 opened 6 years ago

lh123 commented 6 years ago

Type: LanguageService ----- Input information below -----

Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.

Describe the bug

To Reproduce Steps to reproduce the behavior:

class A {};
void func(A a);
void func(int a);

int main() {
    int a = 5;
    func(a);//  Parameter hints prompt 'void func(A a)' , but it should automatic display 'void func(int a)'
}
bobbrow commented 6 years ago

There is currently no type deduction in parameter hints. The best we do right now is match the number of arguments when deciding which one to mark as the active one. This is the same behavior as Visual Studio 2017.

The only difference right now is that VS Code doesn't let us know if you changed which overload you're looking at, so we don't have any control over how they reset the selected overload as you type. All extensions I've used suffer from that.

github-actions[bot] commented 3 years ago

This feature request is being closed due to insufficient upvotes. When enough upvotes are received, this issue will be eligible for our backlog.

github-actions[bot] commented 11 months ago

This feature request has received enough votes to be added to our backlog.

mrx23dot commented 2 months ago

Please implement this! Every programming language has parameters, most also have types, so this would benefit most users. similar to https://github.com/microsoft/vscode-cpptools/issues/12432