microsoft / microsoft/vscode-cpptools
go to declaration
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
- OS and Version: windows 10
- VS Code Version: 1.69.2
- C/C++ Extension Version: 1.11.4
- Other extensions you installed (and if the issue persists after disabling them):
- If using SSH remote, specify OS of remote machine:
- A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).
the display of all parameter declarations disappears
directory used as a project:
https://github.com/llvm/llvm-project
Bug Summary and Steps to Reproduce
directory used as a project:
https://github.com/llvm/llvm-project
the path to the file to open:
G:\llvm-project-main\llvm-project-main\clang\include\clang\Basic\CodeGenOptions.h
at the beginning of the project opening, if you hover the cursor over "setDebugInfo", all definitions of this parameter are shown

if you right-click on "CODEGENOPT" and select "go to declaration", then all the places where this parameter is declared will be displayed in the list

next comes some kind of file processing and when you hover the cursor over "CODEGENOPT", the display of the remaining parameter declarations disappears

also, the "go to declaration" function stops working for the "CODEGENOPT" parameter.
for the "ENUM_CODEGENOPT" parameter, the "go to declaration" function works, but other declarations of this parameter in this file stop being displayed.

the display of all ads disappears after the output of this debugging information to the console

Expected behavior
-
it is expected that all parameter declarations will be displayed when the mouse cursor hovers over it
-
it is expected that when you right-click on the parameter and select the "go to declaration" option, all the places where this parameter is defined will be displayed
-
the expected behavior when hovering the cursor can be viewed in the wboq documentation generator
https://blog.weghos.com/llvm/llvm/clang/include/clang/Frontend/CodeGenOptions.h.html#34

Code sample and Logs
c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.19041.0",
"compilerPath": "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "windows-msvc-x64"
}
],
"version": 4
}
Screenshots
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce with the llvm-project workspace and clang/include/clang/Basic/CodeGenOptions.h, using the c_cpp_properties.json configuration shown. Start by comparing hover and Go to Declaration results for CODEGENOPT and ENUM_CODEGENOPT before and after the console debugging output appears. Done means declarations remain available and both navigation behaviors continue working after processing completes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100