Repository navigation
Open
Labels
Feature: Doc commentsAn issue related to code comments shown in hover, completion, and signature help.Language ServiceWorks in VSSo we'd need to fix it for VS Code to reach parity.enhancementImprovement to an existing feature
Milestone
Description
Type: LanguageService
Describe the bug
- OS and Version: Windows 10 2004
- VS Code Version: 1.49.0-insiders
- C/C++ Extension Version: 0.30.0-insiders3
- Other extensions you installed (and if the issue persists after disabling them): CMake, CMake tools. Still continues after disabling both
- Does this issue involve using SSH remote to run the extension on a remote machine?: No
- Small, simple project, with 2 .cpp files and one .hpp; When I try to use doc comments (///, //, /*, /**, tried all types) on overloaded methods, only the last comment appears on the last overloaded method in the intellisense list;
Steps to reproduce
Import a header file with a class defining
/// Test i
void test(int i);
/// Test f
void test(float f);
/// Test d
void test(double d);
When I try accessing this method (so foo.test()) I get a nice intellisense list with the parameters for the method and I can navigate up/down to see other overloads. However, the doc comment only appears for the first overload in the list, the others just show the argument list. The first overload (so the one that works as expected) is always the last method defined in the .hpp (so in this case, void test(double d); works correctly and the others only show parameters, without the comment).
Expected behaviour
Show all doc comments on their respective methods
Logs
N/A
Screenshots
Additional context
Reacted by starball, Atticus Russell, Timo Schroeder and bananalemonmelon
Reacted by bananalemonmelon
Reacted by bananalemonmelon
Metadata
Metadata
Assignees
Labels
Feature: Doc commentsAn issue related to code comments shown in hover, completion, and signature help.Language ServiceWorks in VSSo we'd need to fix it for VS Code to reach parity.enhancementImprovement to an existing feature
Type
Projects
- StatusShow more project fieldsDone
Activity
michelleangela commentedon Aug 24, 2020
This is related to #2206
davystrong commentedon Aug 24, 2020
Ok, I've upvoted that issue. Thanks for your response! Do you know of any issue for vscode itself?
sean-mcmanus commentedon Aug 25, 2020
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.
davystrong commentedon Aug 25, 2020
Ok, thanks!
starball5 commentedon Jun 11, 2023
Related on Stack Overflow: Why doesn't the VS Code Cpptools extension show function doc comments for functions with overloads?
github-actions commentedon Mar 1, 2025
This feature request is being closed due to insufficient upvotes. Please leave a 👍-upvote or 👎-downvote reaction on the issue to help us prioritize it. When enough upvotes are received, this issue will be eligible for our backlog.
github-actions commentedon Apr 11, 2025
This feature request has received enough votes to be added to our backlog.