[SYCL] Fix regression introduced in https://github.com/intel/llvm/pull/11517 #12002
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch fixes a regression caused by refactoring of
split_string
function in #11517.The regression is the following: the delimiter is a space, input string is
"A B C "
- which has a space at the end.Before #11517
split_string
returned{"A", "B", "C"}
but with #11517 it returns{"A", "B", "C", ""}
.This regression affects multiple CTS tests, verified the fix locally, and also unit tests for
split_string
function were added to this patch. This log shows that one of the unit tests failed before applying the fix: https://github.com/intel/llvm/actions/runs/6974175043/job/18979466747#step:11:372. With the fix it passes.Fixes #11996