vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

IntelliSense tooltip should inherit documentation from delegated function calls

Open NicoJanE opened this issue 1 year ago • 1 comments

Feature Request

Feature request: When a method is a trivial forwarder to another method, IntelliSense in cpptools should show the target method’s documentation and signature in the hover popup, instead of requiring a manual Doxygen \copydoc.

Why this matters: In wrapper classes and adapter layers, it’s common to forward calls to another library (e.g., Skia, STL, etc.). Re-typing documentation or using \copydoc for dozens of methods is tedious and prone to errors. Showing the original docs would:

  • Reduce maintenance overhead.
  • Keep wrappers perfectly in sync with upstream library changes.
  • Improve discoverability for API consumers.

Example:

class MyWrapper { SkSurface* sSurface; public: SkCanvas* getCanvas() { return sSurface->getCanvas(); } };

Current: Hover over getCanvas() → shows only my own method signature, no docs. Desired: Hover over getCanvas() → show the exact documentation and overload info from SkSurface::getCanvas().

Notes:

  • Could work via static analysis for single-statement forwarding functions.
  • Optional opt-in via setting if performance impact is a concern.

Environment:

  • VS Code 1.xx.x
  • C/C++ extension x.x.x
  • IntelliSense mode: <gcc-x64/msvc-x64>

Related tools: Clangd + Doxygen \copydoc achieves similar behavior, but it’s manual and not dynamic.

NicoJanE avatar Aug 15 '25 10:08 NicoJanE

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[bot] avatar Oct 15 '25 11:10 github-actions[bot]