erroneous "set but not used" warnings with reference variables
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 6.2k
- Fork
- 1.7k
- Merge trung bình
- 18 giờ 37 phút
- Pull request đã merge (30 ngày)
- 50
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/vscode-cpptools
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
microsoft/vscode-cpptools#14800 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Browse database relocated to `/var/tmp` despite settings; quickly consumes all available space under `/`Có thể đã có người làm @Colengms đã nhận 3 ngày trước. Đang mởLanguage Service more info needed
microsoft/vscode-cpptools#14795 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
deduction guides do not work through alias templatesCó thể đã có người làm @Colengms đã nhận 3 ngày trước. Đang mởbug Language Service parser
microsoft/vscode-cpptools#14794 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Extension Signature Verification Failed: C/C++ Extension PackCó thể đã có người làm @sean-mcmanus đã nhận 6 ngày trước. Đang mởmore info needed
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/vscode-cpptools#14787 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared librariesCó thể đã có người làm @Colengms đã nhận 11 ngày trước. Đang mởbug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/vscode-cpptools
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
supabase/agent-skills#611 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
polka-codes/test#345 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
GoogleChromeLabs/project-sesame#217 ·
Maintainer thường phản hồi trong vòng 12 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
solana-foundation/solana-com#2202 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100