erroneous "set but not used" warnings with reference variables
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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時間 20分
- マージ済み PR(30日)
- 51
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/vscode-cpptools のほかの issue
-
Feature Request Language Service
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
microsoft/vscode-cpptools#14805 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
cppbuild task uses stale cached VS Developer Environment after upgrading to a newer Visual Studio installation対応中かも @sean-mcmanus が 1 日前に担当しました。 オープンLanguage Service more info needed tasks/build/debug
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
microsoft/vscode-cpptools#14800 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Browse database relocated to `/var/tmp` despite settings; quickly consumes all available space under `/`対応中かも @Colengms が 4 日前に担当しました。 オープンLanguage Service more info needed
microsoft/vscode-cpptools#14795 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
deduction guides do not work through alias templates対応中かも @Colengms が 4 日前に担当しました。 オープンbug fixed Language Service parser
microsoft/vscode-cpptools#14794 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Extension Signature Verification Failed: C/C++ Extension Pack対応中かも @sean-mcmanus が 7 日前に担当しました。 オープンmore info needed
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
microsoft/vscode-cpptools#14787 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
microsoft/vscode-cpptools の issue をすべて見る
似ている issue
-
needs:triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
ai-discovered
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
jessepollak/home#1627 ·
メンテナーはふだん 1 日以内に返信
-
agent-canvas bug llm priority:low ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
OpenHands/OpenHands#17806 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
radius-project/ai-extensions#923 ·
メンテナーはふだん 1 日以内に返信