Intellisense suggestions does not work inside a template lambda and a macro.

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

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

評価

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

調査の方向性

C/C++ 拡張機能を使用する VS Code で、報告された file.cpp の問題を再現し、その後、直接のテンプレートラムダ式内と MACRO(test.) 内で Ctrl+Space による候補を比較します。テンプレートラムダとマクロを組み合わせたコンテキストに対する IntelliSense の処理を追跡します。完了条件は、他の例と同様にマクロの場合でも func が候補として表示されることです。

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

説明

bug Language Service Visual Studio
Environment
  • OS and Version: Windows 10
  • VS Code Version: 1.84.2
  • C/C++ Extension Version: v1.18.5
Bug Summary and Steps to Reproduce

Bug Summary:
Intellisense suggestions does not work when inside a template lambda and a macro at the same time.

#define MACRO(x) x
struct Test{
    void func() {  }
};

void main(){
    Test test;
    auto lambda = [&](auto a){
        test. // OK
        MACRO(test.) // NOT WORK
    };
    auto lambda2 = [&](int a){
        MACRO(test.) // OK
    };
}

Steps to reproduce:

  1. Create an empty folder, create a file.cpp with the contents of the example. Open the folder.
  2. Move cursor after test., press Ctrl+Space.
  3. See error: no suggestion of func
Configuration and Logs
Configuration: without `c_cpp_properties.json` (all properties are default)
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 を短くまとめたダイジェスト。