BigBahss / vscode-cmantic

C/C++ code generation for VS Code: Generate Definitions, Getters, Setters, and much more.
https://bigbahss.github.io/vscode-cmantic/
MIT License
82 stars 9 forks source link

Problems with overloaded functions on cpptools #30

Open BigBahss opened 3 years ago

BigBahss commented 3 years ago

C-mantic experiences some problems with overloaded functions when using cpptools. This is a result of how cpptools provides definitions for overloaded functions. For instance, say you have an overload set of 4 functions, 1 of which is already defined, the others are not. If you try 'Go to Definition' on any of the undefined declarations, cpptools will go to the overload that is defined (which is not the same function). This affects C-mantic, as you will not be able to use 'Add Definition' on any of the undefined functions, since it thinks a definitions already exists (since cpptools is incorrectly providing a definition for it). I'm not sure what the best way to handle this is, besides getting cpptools to change this behavior, because frankly, it's the job of the language server to understand overloads and know that one function is different from another.