microsoft / microsoft/vscode-cpptools
Renaming (F2) parameter in function declaration in header file doesn't rename it in defintion
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 6.2k
- フォーク
- 1.7k
- 平均マージ
- 14時間 46分
- マージ済み PR(30日)
- 61
説明
Environment
- OS and Version: Windows 10
- VS Code Version: 1.70.2
- C/C++ Extension Version: 1.11.5
Bug Summary and Steps to Reproduce
When renaming (F2) a parameter in a function declaration in a header file, the parameter in the function definition in the source file that includes the header file is not renamed and it is also not listed in the refactor preview. The same applies vice versa.
However, if the function declaration is placed in the source file, the parameter in the function definition is listed in the refactor preview if the parameter in the declaration is renamed and vice versa.
Expected behavior
The parameter in the function definition should be listed in the refactor preview for selection if the parameter in the declaration is renamed and vice versa, regardless of whether the declaration is placed in the source or in a included header file.
Code sample and Logs
// test.c
#include "test.h"
void foo(int arg)
{
return;
}
// test.h
void foo(int arg);
Screenshots
Refactor preview when renaming a parameter in the declaration when it is placed in the source file:

Refactor preview when renaming a parameter in the definition when it is placed in the source file:

After renaming a parameter in the declaration when it is placed in the included header file (no refactor preview):

After renaming a parameter in the definition when it is placed in the included header file (no refactor preview):

Additional context
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
VS Code で F2 を使用し、issue の test.c と test.h の例で名前変更を再現してから、インクルードされたヘッダーにまたがる宣言と定義のリファクタリングプレビュー処理を追跡します。一方のパラメーターリストの名前を変更したときに、もう一方のファイルの対応するパラメーターがプレビューで選択対象として一覧に表示されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp, typescript
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100