Function pointer variables should be colorized as functions when they're called.
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Reproduziere das Beispiel in einer C- oder C++-Datei und untersuche, wie der semantische Analysator Aufrufe über Funktionszeiger behandelt, wobei die verknüpften Diagnose- und LSP-Protokolle als Kontext dienen. Erledigt ist die Aufgabe, wenn die aufgerufene Variable f und das Strukturelement ptr dieselbe Funktionsfarbgebung wie func erhalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Environment
- OS and Version: NixOS 24.11
- VS Code Version: 1.94.2
- C/C++ Extension Version: 1.22.2
- If using SSH remote, specify OS of remote machine: N/A
Bug Summary and Steps to Reproduce
Bug Summary:
Executing a function call from a function pointer has mostly the same relevance as any normal function call; as such it should be colorized in a similar way.
Minimal example:
Note how the syntactic token type is easily detected thanks to the parentheses (and is identified as "entity.name.function.c" for the bare function pointer and as "entity.name.function.member.c" for the function pointer struct member), but the semantic analyzer ignores this particular property
Steps to reproduce:
- Define a function in a C or C++ file;
- Place the functions' address in a function pointer variable;
- Call the function from the variable.
Expected behavior:
In the above screenshot, the text f on line 11 and ptr on line 12 should be colorized as func on line 10 is (i.e. purple)
Configuration and Logs
No "c_cpp_properties.json" present
Diagnostic logs: https://pastebin.com/nRDFDEKL
LSP logs: https://pastebin.com/Z0iZDQ56
Other Extensions
No response
Additional context
No response
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 14 Std. 46 Min.
- Gemergte PRs (30 T.)
- 61
Beitragsleitfaden
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 35/100
microsoft/vscode-cpptools#14787 ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries Offenbug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 1 zugewiesene Person ·
-
Language Service more info needed
microsoft/vscode-cpptools#14778 · 1 Kommentar · 1 zugewiesene Person ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 64/100
microsoft/vscode-cpptools#14769 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
microsoft/vscode-cpptools#14768 · 1 Kommentar ·
Alle Issues in microsoft/vscode-cpptools
Ähnliche Issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 76/100
-
code-quality refactoring
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
langchain-ai/deepagents#6450 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
vercel/react-tweet#225 ·