microsoft / microsoft/vscode-cpptools

Doc comments don't show for overloaded methods

Offen
#6,008 7 Kommentare 6 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

enhancement Feature: Doc comments Language Service Works in VS
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, das Problem mit den gezeigten überladenen Deklarationen in einer C++-Headerdatei und dem VS Code C/C++ LanguageService zu reproduzieren. Untersuche, wie Vervollständigungs- oder Signaturhilfeeinträge die Dokumentation jeder Überladung zuordnen. Als erledigt gilt die Aufgabe, wenn IntelliSense den entsprechenden Dokumentationskommentar für jede Überladung anzeigt, nicht nur für die letzte Deklaration.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.