fix(libc): build the libc++ regex_error test with clang #27320
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27320"
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 boykopovar/AnyPS5. Originally posted by magnub on 2026-11-25T20:48:24Z.
What
GuestLibcxxRegexError.cppcastvtable[2], aconst void*, straight to a function pointer type. GCC accepts that; clang rejects it ("reinterpret_cast from 'const void *' to 'What' ... casts away qualifiers"), soguest_libcxx_regex_error_testsdoes not build on macOS. #27164 lists it as one of the targets that do not build there. The cast now goes throughconst_cast<void*>, asGuestLibcInternalBasicString.cppandGuestLibcInternalLibcForwards.cppalready do. Test-only change.Tested
macOS 27.0.1 on an Apple M1 Pro, Apple clang 21.0.0, x86_64 Release build under Rosetta 2. Build:
mainff5b409ddaplus #17425, #11049 and #26739, which the macOS build needs:guest_libcxx_regex_error_testsfails to build with the error above.guest_libcxx_regex_errorpasses (1.06 s).The error also reproduces with Ubuntu clang 18.1.3 on Linux, and the fixed line compiles there.
tools/check_conventions.py --base origin/mainpasses. Log attached.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_012LL9hfx4BY6MbUCYMduDAQ
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T20:51:50Z.
Review: APPROVED
Reviewed — looks good
The changed cast removes the const qualifier before converting the vtable entry to the function pointer type, addressing the reported Clang compile error while leaving the test call unchanged.
What I ran
Reviewed head
038792eb11d0112eea128e55467f590107fc556ausingrepo_read.pyto inspect the PR description, commit list, diff, and the changed source file. No build or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No build or test was run in this review; the macOS and Linux results in the description are author-reported.
files.jsonwas unavailable through the reader, so I could not compare the reviewed file against its reviewed-file inventory. No files were excluded in the manifest shown; it listscore/libs/tests/GuestLibcxxRegexError.cppas included, and that full source was read.To get this to a good state
Nothing is required.