erroneous "set but not used" warnings with reference variables
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Reproduce the warning in a blank .cpp file using the reference-variable example, then inspect the linked diagnostic and language-server logs to locate the relevant analysis path. Done means the assignment through the reference is recognized as useful, with no set-but-unused warning or dimming.
由索引模型根据 Issue 内容生成。
描述
Environment
- OS and Version: Arch Linux (linux
7.2.6.arch2-1) - VS Code Version: 1.139.0 commit 2242ebbb54efeeb0129e08e919e7e8d43033cd83
- C/C++ Extension Version: pre-release 1.35.2
- If using SSH remote, specify OS of remote machine: N/A
Bug Summary and Steps to Reproduce
Bug Summary:
In the following code:
void modify(int& x){
x = 3;
}
x is being erroneously marked as set-but-unused, even though the assignment can be useful.
Steps to reproduce:
- Create a blank folder and a .cpp file with the content shown above in it
- Open the file
- See error
Expected behavior:
The variable is recognized as used and not dimmed, and there is no warning message on hover.
Configuration and Logs
c_cpp_properties.json: (none)
Other Extensions
No response
Additional context
No response
- 主要语言
- TypeScript
- 星标
- 6.2k
- 派生
- 1.7k
- 平均合并
- 18 小时 16 分钟
- 30 天内合并 PR
- 51
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/vscode-cpptools 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 52/100
microsoft/vscode-cpptools#14800 ·
维护者通常 1 天内回复
-
Browse database relocated to `/var/tmp` despite settings; quickly consumes all available space under `/`可能已有人在做 @Colengms 于 3 天前认领。 未关闭Language Service more info needed
microsoft/vscode-cpptools#14795 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
deduction guides do not work through alias templates可能已有人在做 @Colengms 于 3 天前认领。 未关闭bug Language Service parser
microsoft/vscode-cpptools#14794 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Extension Signature Verification Failed: C/C++ Extension Pack可能已有人在做 @sean-mcmanus 于 6 天前认领。 未关闭more info needed
难度 4/5 3-5 天 新手友好度 35/100
microsoft/vscode-cpptools#14787 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries可能已有人在做 @Colengms 于 11 天前认领。 未关闭bug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 microsoft/vscode-cpptools 的全部 Issue
相似的 Issue
-
triage
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
mermaid-js/mermaid-live-editor#2053 ·
维护者通常 1 天内回复
-
factory
难度 2/5 1-3 小时 新手友好度 82/100
jessepollak/home#1455 ·
维护者通常 1 天内回复
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 95/100
lingdojo/kana-dojo#31227 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
appandflow/stim#1838 ·
维护者通常 1 天内回复