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

Doxygen param list not properly displayed on hover

Open HuskyNator opened this issue 1 year ago • 2 comments

Environment

  • OS and Version: Windows 10
  • VS Code Version: 1.85.1
  • C/C++ Extension Version: 1.18.5
  • If using SSH remote, specify OS of remote machine: Not Applicable

Bug Summary and Steps to Reproduce

Bug Summary: Hovering over a function with a multi-param line does not display properly.

Steps to reproduce:

  1. Create a function with 2 parameters, eg: void test(int a, int b){}
  2. Add documentation, int the form of a multi-param \param (or @param) line, eg: /// @param a, b input
  3. Hover over the function name to see the documentation preview
  4. Notice how the formatting does incorrectly recognizes , as part of the first parameter & b as part of the description

Expected behavior: The second (or more) parameter(s) should be recognized as being parameters, instead of descriptions of these parameters. This is already correctly displayed by the syntax highlighting colors. The documentation hovering preview should as well.

Source: https://www.doxygen.nl/manual/commands.html#cmdparam:~:text=Note%20that%20you,comma%20separated%20list.

Configuration and Logs

c_cpp_properties.json:

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.20348.0",
            "intelliSenseMode": "windows-msvc-x64"
        }
    ],
    "version": 4
}

Logs, Note: I tried using different compilers, but every other complained it could not open standard library headers in intellisense. I'm not sure if this is another bug, but it does not happen using this compiler path:
-------- Diagnostics - 1/16/2024, 4:04:17 PM
Version: 1.18.5
Current Configuration:
{
    "name": "Win32",
    "includePath": [
        "e:/Code/pbrt-v4/**"
    ],
    "defines": [
        "_DEBUG",
        "UNICODE",
        "_UNICODE"
    ],
    "windowsSdkVersion": "10.0.20348.0",
    "intelliSenseMode": "windows-msvc-x64",
    "compilerPathIsExplicit": true,
    "cStandardIsExplicit": true,
    "cppStandardIsExplicit": true,
    "intelliSenseModeIsExplicit": true,
    "cStandard": "c17",
    "cppStandard": "c++20",
    "mergeConfigurations": false,
    "compilerPath": "C:\\msys64\\mingw64\\bin\\gcc.exe",
    "browse": {
        "path": [
            "e:/Code/pbrt-v4/**",
            "${workspaceFolder}"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
cpptools version (native): 1.18.3.0
Translation Unit Mappings:
[ E:\Code\pbrt-v4\src\pbrt\bxdfs.cpp ]:
    E:\Code\pbrt-v4\src\pbrt\bxdfs.h *
[ E:\Code\pbrt-v4\src\iri\lambertianBRDF.cpp ]:
    E:\Code\pbrt-v4\src\iri\lambertianBRDF.cpp
Translation Unit Configurations:
[ E:\Code\pbrt-v4\src\pbrt\bxdfs.cpp ]:
    Process ID: 12300
    Memory Usage: 352 MB
    Compiler Path: C:\msys64\mingw64\bin\gcc.exe
    Includes:
        C:\msys64\mingw64\include\c++\12.1.0
        C:\msys64\mingw64\include\c++\12.1.0\x86_64-w64-mingw32
        C:\msys64\mingw64\include\c++\12.1.0\backward
        C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\12.1.0\include
        C:\msys64\mingw64\include
        C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\12.1.0\include-fixed
        E:\Code\pbrt-v4\src
        E:\Code\pbrt-v4\src\ext\openvdb\nanovdb
    Defines:
        _DEBUG
        UNICODE
        _UNICODE
    Standard Version: c++20
    IntelliSense Mode: windows-gcc-x64
    Other Flags:
        --g++
        --gnu_version=120100
[ E:\Code\pbrt-v4\src\iri\lambertianBRDF.cpp ]:
    Process ID: 21460
    Memory Usage: 86 MB
    Compiler Path: C:\msys64\mingw64\bin\gcc.exe
    Includes:
        C:\msys64\mingw64\include\c++\12.1.0
        C:\msys64\mingw64\include\c++\12.1.0\x86_64-w64-mingw32
        C:\msys64\mingw64\include\c++\12.1.0\backward
        C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\12.1.0\include
        C:\msys64\mingw64\include
        C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\12.1.0\include-fixed
        E:\Code\pbrt-v4\src
    Defines:
        _DEBUG
        UNICODE
        _UNICODE
    Standard Version: c++20
    IntelliSense Mode: windows-gcc-x64
    Other Flags:
        --g++
        --gnu_version=120100
Total Memory Usage: 438 MB

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 13591

------- Potential include path issues --------
Some headers exist in multiple locations. If IntelliSense is behaving incorrectly,
try adding one of the alternate paths to the "includePath" in your configuration in
c_cpp_properties.json to override the automatic path discovery for that header.

Using: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/float.h
    Alternative: "E:/Code/pbrt-v4/src/pbrt/util"
Using: C:/msys64/mingw64/include/getopt.h
    Alternative: "E:/Code/pbrt-v4/src/ext/glfw/deps"
Using: C:/msys64/mingw64/include/io.h
    Alternative: "E:/Code/pbrt-v4/src/ext/openvdb/nanovdb/nanovdb/util"
    Alternative: "E:/Code/pbrt-v4/src/ext/openvdb/openvdb/openvdb/io"
Using: C:/msys64/mingw64/include/c++/12.1.0/math.h
    Alternative: "E:/Code/pbrt-v4/src/ext/openvdb/openvdb/openvdb/math"
Using: C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/stdint.h
    Alternative: "E:/Code/pbrt-v4/src/ext/glfw/deps/vs2008"
Using: C:/msys64/mingw64/include/string.h
    Alternative: "E:/Code/pbrt-v4/src/ext/openvdb/openvdb_ax/openvdb_ax/codegen"

Other Extensions

  • C/C++ Extension Pack
  • C/C++ Themes

Testing with all other extensions disabled reveals the issue still persists.

Additional context

image image

HuskyNator avatar Jan 16 '24 15:01 HuskyNator

Thank you for submitting your issue. For now, you can document multiple parameters using multiple param tags. For example:

/// @param a - integer /// @param b - integer

We will start looking into this issue.

browntarik avatar Jan 16 '24 18:01 browntarik

@HuskyNator Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.19.3

sean-mcmanus avatar Feb 13 '24 22:02 sean-mcmanus