Variable annotation hint error
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c, typescript, vscode
- Domain
- devtools
Research direction
Reproduce the issue in c4.c using the reported C17 and clang configuration, with the parameter comments shown in the report; c_cpp_properties.json has no custom configuration. Start from the C/C++ extension's variable annotation or inlay-hint handling, and consider the issue done when variable b displays its own comment, dx, rather than a's asd.
Written by the indexing model from the issue text.
Description
Environment
- OS and Version: Ubuntu 24.04.3 LTS
- VS Code Version:1.106.3 bf9252a2fb45be6893dd8870c0bf37e2e1766d61 x64
- C/C++ Extension Version: 1.28.3
- If using SSH remote, specify OS of remote machine:
Bug Summary and Steps to Reproduce
Bug Summary:
Using similar
(int a, //asd
b, //dx
)
The method creates multiple variables, when using variable b later, it displays the comment of variable a, i.e., asd, but it should be dx
Configuration and Logs
No configuration in c_cpp_properties.json
Running C/C++: Log Diagnostics :
-------- Diagnostics - 2025/11/30 11:10:31
Version: 1.28.3
Current Configuration:
{
"name": "Linux",
"includePath": [
"/home/fufu/项目/C/c4/**"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "linux-clang-x64",
"compilerPathInCppPropertiesJson": "/usr/bin/clang",
"intelliSenseModeIsExplicit": false,
"cStandardIsExplicit": false,
"cppStandardIsExplicit": false,
"mergeConfigurations": false,
"recursiveIncludes": {},
"recursiveIncludesReduceIsExplicit": false,
"recursiveIncludesPriorityIsExplicit": false,
"recursiveIncludesOrderIsExplicit": false,
"compilerPathIsExplicit": false,
"browse": {
"limitSymbolsToIncludedHeaders": true
}
}
Additional Tracked Settings:
{
"editorTabSize": 4,
"editorInsertSpaces": true,
"editorAutoClosingBrackets": "languageDefined",
"filesEncoding": "utf8",
"filesAssociations": {
"*.toml": "toml"
},
"filesExclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/Thumbs.db": true
},
"filesAutoSaveAfterDelay": false,
"editorInlayHintsEnabled": true,
"editorParameterHintsEnabled": true,
"searchExclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true
},
"workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.28.3.0
Current database path: /home/fufu/.cache/vscode-cpptools/6e915ae8f1608d34a99382d070a9ccfc/.browse.VC.db
Translation Unit Mappings:
[ /home/fufu/项目/C/c4/c4.c - source TU]:
Translation Unit Configurations:
[ /home/fufu/项目/C/c4/c4.c ]
Process ID: 13134
Memory Usage: 24 MB
Compiler Path: /usr/bin/clang
Include paths:
system include: /usr/lib/llvm-18/lib/clang/18/include
system include: /usr/local/include
system include: /usr/include/x86_64-linux-gnu
system include: /usr/include
Standard Version: c17
IntelliSense Mode: linux-clang-x64
Other Flags:
--clang
--clang_version=180103
Total Memory Usage: 24 MB
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 8537
Other Extensions
background: Background Modification Plugin(The issue still exists after disabling the plugin)
Chinese (Simplified) (简体中文) Language Pack for Visual Studio Code: Provide Chinese pages for Chinese developers
Additional context
No response
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
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.
More from microsoft/vscode-cpptools
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/vscode-cpptools#14787 ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries Openbug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 1 assignee ·
-
Language Service more info needed
microsoft/vscode-cpptools#14778 · 1 comment · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 64/100
microsoft/vscode-cpptools#14769 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
microsoft/vscode-cpptools#14768 · 1 comment ·
All issues in microsoft/vscode-cpptools
Similar issues
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Plugin stuck at "loading" on DSH 0.1.6-alpha.2 — turnTail list slot registration missing options.id Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
chrisparsons83/flexspotff#153 ·