inlay parameter hint does not work for dependent function templates

Đang mở
#9,744 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
devtools

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện ví dụ về function template phụ thuộc trong issue với VS Code C/C++ extension và xác nhận rằng lệnh gọi template tường minh nhận được inlay hint, trong khi lệnh gọi được suy luận thì không. Được xem là hoàn tất khi lệnh gọi được suy luận hiển thị một gợi ý arg: trước val mà không thay đổi hành vi của lệnh gọi template tường minh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement Feature: Inlay Hint Language Service Visual Studio
Environment
  • OS and version: Ubuntu 20.04
  • VS Code: 1.70.0
  • C/C++ extension: 1.20.0
  • Other extensions you installed (and if the issue persists after disabling them):
  • If using SSH remote, specify OS of remote machine:
  • A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).
Bug Summary and Steps to Reproduce

Bug Summary:
I'm not quite sure this should be a bug or a feature request, since it seems to be highly related with #2973

Steps to reproduce:

template <typename T>
void func1 (T arg);

template <typename T>
void func2 () {
    T val;
    func1(val);  // no inlay hint for `val`
    func1<int>(42);  // OK
}
Expected behavior

an inlay hint arg: appears before val, because there's no other overload besides the main template.

Code sample and Logs
template <typename T>
void func1 (T arg);

template <typename T>
void func2 () {
    T val;
    func1(val);  // no inlay hint for `val`
    func1<int>(42);  // OK
}

```json
{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**",
            ],
            "defines": [
            ],
            "compilerPath": "/usr/bin/g++-10",
            "cStandard": "c11",
            "cppStandard": "c++11",
            "intelliSenseMode": "gcc-x64",
            "browse": {
                "path": [
                    
                ]
            }
        }
    ],
    "version": 4
}


### Screenshots

_No response_

### Additional context

_No response_
Ngôn ngữ chính
TypeScript
Star
6.2k
Fork
1.7k
Merge trung bình
14 giờ 46 phút
Pull request đã merge (30 ngày)
61

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/vscode-cpptools

Tất cả issue của microsoft/vscode-cpptools

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.