mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-22 23:29:02 +00:00
spir: Fix -Wcatch-value warnings (#1565)
`std::exception` and `std::runtime_error` are polymorphic types and as such they shouldn't be passed by value. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
c6bb15c289
commit
e9d2abf705
@@ -462,8 +462,7 @@ bool TestRunner::runBuildTest(cl_device_id device, const char *folder,
|
||||
log_info("kernel '%s' failed.\n", kernel_name.c_str());
|
||||
(*m_failureHandler)(test_name, kernel_name);
|
||||
}
|
||||
}
|
||||
catch (std::runtime_error err)
|
||||
} catch (const std::runtime_error& err)
|
||||
{
|
||||
++failures;
|
||||
log_info("kernel '%s' failed: %s\n", kernel_name.c_str(), err.what());
|
||||
|
||||
Reference in New Issue
Block a user