diff --git a/tests/Unit/HC/ubsan.cpp b/tests/Unit/HC/ubsan.cpp index 1bf4320a4c0..414789a5482 100644 --- a/tests/Unit/HC/ubsan.cpp +++ b/tests/Unit/HC/ubsan.cpp @@ -6,7 +6,7 @@ void fill(hc::array_view& input, int x) { - hc::parallel_for_each(input.get_extent(), [=](hc::index<1> idx) [[hc]] { + hc::parallel_for_each(input.get_extent(), [=](const hc::index<1>& idx) [[hc]] { input[idx[0]] = x; }).wait();