Using dot '.' as member access operator fails to trigger auto completion/intellisense when used inside macro.

オープン
#14,604 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
cpp, typescript, vscode

調査の方向性

VS Code 1.108.2 と C/C++ 拡張機能 1.32.2 を使用して file.hpp で問題を再現し、func 内のマクロ呼び出しから始めて、'.' と '->' を比較します。マクロ引数内でのメンバーアクセスに対する補完の動作を追跡します。完了条件は、Trigger Suggest を呼び出した場合も含め、'.' で '->' と同じメンバー候補が開くことです。

索引モデルが issue の本文から書いたものです。

説明

bug Feature: Auto-complete Language Service Visual Studio
Environment
  • OS and Version: Windows 10
  • VS Code Version: 1.108.2
  • C/C++ Extension Version: 1.32.2
  • If using SSH remote, specify OS of remote machine: none
Bug Summary and Steps to Reproduce

Bug Summary:
There is a feature that allows to type '.' as access member operator on any type to show completion window with all members and then it resolves to '.' or '->' automatically.
This feature fails when used inside macro call.

Steps to reproduce:

  1. Paste code (file.hpp):
#define myMacro(value) 

struct MyStruct
{
    int value;
};

struct Container
{
    int value2;
    MyStruct *myStruct;
};

void func(Container *container)
{
    myMacro(container.                         // <- problem here
}
  1. Go to 'func' function and type in 'myMacro(container'
  2. Now when we type access member operator '.' normally popup with suggestions should appear - but it doesn't.
  3. Instead of '.' type '->' - suggestions appear.

Expected behavior:
After typing '.' in macro call we should see suggestions with struct members just like after typing '->'.
'Trigger Suggest' command (CTRL+SPACE) doesn't work on '.' but works after '->' when used in macro call.

Configuration and Logs
ask for more details
Other Extensions

No response

Additional context

No response

主要言語
TypeScript
スター
6.2k
フォーク
1.7k
平均マージ
14時間 46分
マージ済み PR(30日)
61

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/vscode-cpptools のほかの issue

microsoft/vscode-cpptools の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。