tests: cast the GameInput vtbl slots through const_cast for clang-cl #3868
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3868"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T15:43:54Z.
Refs #3867.
startup_gameinput_trace.cppcalls through GameInput vtable slots withvtblisconst void* const*, so eachreinterpret_cast<Fn>(vtbl[n])dropsconst. MSVC accepts that; clang-cl rejects it, which means the documented clang-cl route indocs/non-windows-hosts.mdcannot build this device-free executable:Change. Four sites now cast through
const_cast<void*>first:Both compilers accept it and nothing changes at runtime: these are vtable slots used for calls, never written through. No test is weakened and no expectation moves.
Verification — Debian, clang-cl 19.1.1 + lld-link,
xwin splatSDK 10.0.26100, Release,mainat0939575e:Not established. No MSVC here, so the MSVC side is unchanged-by-inspection; Windows CI is the check. This is only the first of the three gaps in #3867 — the frontend crash in
xmem_commit_protection_checkand the unresolved intrinsics instartup_host_cpu_probeare reported there and not touched here.Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-12-02T15:44:04Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
7ad9c36ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T15:58:33Z.
Review: APPROVED
Reviewed
f33f2107. The four calls keep their vtable indices, signatures and receivers. The explicit const cast only normalizes the intermediate pointer conversion. The GameInput test and shim built with MSVC Debug at7ad9c36b. The merged head leaves the GameInput fixture source unchanged. The runtime test returned capability skip 77 because XInput pad 0 is connected. The clang-cl build result is from the author.