erroneous "set but not used" warnings with reference variables
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 68/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 18 Std. 16 Min.
- Gemergte PRs (30 T.)
- 51
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/vscode-cpptools
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
microsoft/vscode-cpptools#14800 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Browse database relocated to `/var/tmp` despite settings; quickly consumes all available space under `/`Evtl. vergeben @Colengms hat das vor 4 Tagen übernommen. OffenLanguage Service more info needed
microsoft/vscode-cpptools#14795 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
deduction guides do not work through alias templatesEvtl. vergeben @Colengms hat das vor 4 Tagen übernommen. Offenbug Language Service parser
microsoft/vscode-cpptools#14794 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Extension Signature Verification Failed: C/C++ Extension PackEvtl. vergeben @sean-mcmanus hat das vor 7 Tagen übernommen. Offenmore info needed
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
microsoft/vscode-cpptools#14787 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared librariesEvtl. vergeben @Colengms hat das vor 12 Tagen übernommen. Offenbug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in microsoft/vscode-cpptools
Ähnliche Issues
-
priority: P2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
prime-radiant-inc/evener#3291 ·
Maintainer antworten meist innerhalb von 1 Tag
-
accessibility bug revealjs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
quarto-dev/quarto-cli#14961 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
supabase/agent-skills#614 ·
-
Content
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
RunestoneInteractive/rs#1559 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen