diff --git a/sycl/source/detail/kernel_compiler/kernel_compiler_opencl.cpp b/sycl/source/detail/kernel_compiler/kernel_compiler_opencl.cpp index 5090cc3b48237..7b00f8c5d24e3 100644 --- a/sycl/source/detail/kernel_compiler/kernel_compiler_opencl.cpp +++ b/sycl/source/detail/kernel_compiler/kernel_compiler_opencl.cpp @@ -99,7 +99,7 @@ void loadOclocLibrary(const std::vector &IPVersionVec) { } return true; }; - for (const std::string_view result : OclocPaths) { + for (const std::string_view &result : OclocPaths) { if (attemptLoad(result)) return; // exit on successful attempt }