test(agc): discard the results of recompiles expected to be refused #617
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/617"
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 Erige005 on 2026-10-05T07:12:51Z.
What
ExpectRefusedin thescalar_program_endandscalar_sopk_miscexecution tests calls the[[nodiscard]]ShaderRecompiler::Recompileonly to check that it throws, and drops the result. GCC 15 warns about it (-Wunused-result). The result is now discarded explicitly withstatic_cast<void>, asScalarGetreg.cpp,GlobalLoadAddtid.cppandBufferAtomicCsub.cppalready do. Test behaviour is unchanged.Tested
Ubuntu 26.04 (WSL2), GCC 15.2.0,
-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON:-Wunused-resultwarnings are gonectest: 265/265 passed (14 GPU subgroup tests skipped, as onmainin this environment), includingagc_driver_scalar_program_endandagc_driver_scalar_sopk_miscChecklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-05T09:02:59Z.
Thanks, this is right.
ShaderRecompiler::Recompileis[[nodiscard]], andstatic_cast<void>is what the other execution tests already use. With GCC 16.2 here, main's build prints the two-Wunused-resultwarnings forScalarProgramEnd.cppandScalarSopkMisc.cpp, and with this change there are none. Both tests still pass, and the full ctest passes with it merged (Linux). It only touches test code. Ready to merge from my side once CI has run.