Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inaccurate Go-to-Implementation for Functions with the Same Name in C++ #12715

Open
feng-xys opened this issue Sep 14, 2024 · 1 comment
Open
Assignees
Labels
Language Service more info needed The issue report is not actionable in its current state not reproing We're not able to reproduce the issue (it's unlikely to get fixed until we find one).

Comments

@feng-xys
Copy link

Environment

  • OS and Version: windows 22621.4169
  • VS Code Version: 版本: 1.93.1 (user setup)
  • C/C++ Extension Version: v1.21.6
  • If using SSH remote, specify OS of remote machine: wsl -2.2.4.0, Ubuntu 22.04.4 LTS

Bug Summary and Steps to Reproduce

Description:
When working on a C++ project in Visual Studio Code, I encounter an issue where clicking on a function call in a header file does not directly navigate to the correct function definition when there are multiple functions with the same name across different classes. Instead, VSCode presents a list of all matching functions, requiring manual selection.
Steps to Reproduce:
1.
Create two or more C++ classes each containing a function with the same name.
2.
Include these headers in a source file.
3.
Attempt to navigate to the implementation of the function by clicking on its declaration in the header file.
Expected Behavior: Visual Studio Code should ideally be able to discern the correct function implementation based on context and directly navigate to it without needing user intervention.

Actual Behavior:
A dropdown appears listing all implementations of the function with the same name, necessitating manual selection of the intended function.

Expected Behavior:
Visual Studio Code should ideally be able to discern the correct function implementation based on context and directly navigate to it without needing user intervention.
Actual Behavior: A dropdown appears listing all implementations of the function with the same name, necessitating manual selection of the intended function.

Configuration and Logs

c_cpp_properties.json
{
    "configurations": [
        {
            "name": "M33",
            "includePath": [
                "${workspaceFolder}/**",
                
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE",
                "USE_HAL_DRIVER",
                "STM32H563xx",
                "PLATFORM_CORTEX_M33",
                "_GNU_SOURCE",
                "_POSIX_TIMERS"
            ],
            "compilerPath": "/opt/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-g++",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "gcc-arm"
        }
    ],
    "version": 4
}

Other Extensions

No response

Additional context

No response

@sean-mcmanus sean-mcmanus self-assigned this Sep 16, 2024
@sean-mcmanus sean-mcmanus added Language Service more info needed The issue report is not actionable in its current state not reproing We're not able to reproduce the issue (it's unlikely to get fixed until we find one). labels Sep 16, 2024
@sean-mcmanus
Copy link
Collaborator

I don't repro the bug. This normally is supposed to work if everything is working properly. Can you provide more repro info, such as the contents of the repro files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Service more info needed The issue report is not actionable in its current state not reproing We're not able to reproduce the issue (it's unlikely to get fixed until we find one).
Projects
Status: No status
Development

No branches or pull requests

2 participants