skip to Main Content

Does anyone know how to remove overloads in the quick info popup for vscode? If I hover over a function with no overloads, it shows the comment description I wrote for the function using /**. But if I hover over a function with overloads, they just show the function signatures for all the overloads.

C/C++ Extension Version: v1.15.4

Example Code:

/**
    @brief This is a function.
*/
void foo(int x) {}


/**
    @brief This is a function.
*/
void foo(float x) {}

Screenshots:

enter image description here enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    I was able to resolve this issue with the help of a maintainer. It was because my intelliSenseEngine was set to Tag Parser instead of default.


  2. TL;DR: This is a known issue related to current performance limitations. Wait patiently and the fix will come in the future.

    If you google "site:github.com/microsoft/vscode-cpptools/issues overload comment hover", you’ll find (it was the top search result for me) Doc comments don’t show for overloaded methods #6008, where a maintainer (@sean-mcmanus) wrote:

    We’re currently only show doc comments for the "active signature", but for when the overloads differ by type, we end up choosing the wrong overload (i.e. #2206).

    We intentionally skipped sending additional overload doc comments because it potentially could take too long. We had the idea of sending the doc comments if they able to get computed in < 1 second, but we were worried that users might get confused by the inconsistent results.

    We’re expecting that this will get fixed after we fix the performance issue with doc comments later on.


    Apparently if your C_Cpp.intelliSenseEngine setting is set to Tag Parser, changing it to default may give you the desired behaviour (source).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search