Open
Description
Describe the bug
https://github.com/intel/llvm/actions/runs/7587305754/job/20673950071
With 8c2b0d4, we may get unexpected different function names with lambda in Windows.
This looks like an unexpected side effect of setting dependence.
8c2b0d4 is reverted temporarily to unblock pulldown, we should have a look and reland it with fixes. Thanks.
// In dependent contexts, function names may change.
setDependence(MayBeDependent(Kind) && ParentContext->isDependentContext()
? ExprDependence::Value
: ExprDependence::None);
Failure log:
FAIL: SYCL :: DiscardEvents/discard_events_mixed_calls.cpp (399 of 1838)
******************** TEST 'SYCL :: DiscardEvents/discard_events_mixed_calls.cpp' FAILED ********************
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
D:/github/_work/llvm/llvm/install/bin/clang++.exe -fsycl -fsycl-targets=spir[64](https://github.com/intel/llvm/actions/runs/7587305754/job/20673950071#step:12:65) D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp -o D:\github\_work\llvm\llvm\build-e2e\DiscardEvents\Output\discard_events_mixed_calls.cpp.tmp.out
# executed command: D:/github/_work/llvm/llvm/install/bin/clang++.exe -fsycl -fsycl-targets=spir64 'D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp' -o 'D:\github\_work\llvm\llvm\build-e2e\DiscardEvents\Output\discard_events_mixed_calls.cpp.tmp.out'
# .---command stderr------------
# | D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp:[83](https://github.com/intel/llvm/actions/runs/7587305754/job/20673950071#step:12:84):3: error: no matching function for call to 'TestHelper'
# | 83 | TestHelper(Q, [&](sycl::range<1> Range, int *Harray,
# | | ^~~~~~~~~~
# | D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp:37:6: note: candidate function not viable: no known conversion from '(lambda at D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp:83:17)' to 'const std::function<void (sycl::range<1>, int *, sycl::buffer<int, 1>)>' for 2nd argument
# | 37 | void TestHelper(sycl::queue Q,
# | | ^
# | 38 | const std::function<void(sycl::range<1> Range, int *Harray,
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 39 | sycl::buffer<int, 1> Buf)> &Function) {
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp:116:3: error: no matching function for call to 'TestHelper'
# | 116 | TestHelper(
# | | ^~~~~~~~~~
# | D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp:37:6: note: candidate function not viable: no known conversion from '(lambda at D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp:117:10)' to 'const std::function<void (sycl::range<1>, int *, sycl::buffer<int, 1>)>' for 2nd argument
# | 37 | void TestHelper(sycl::queue Q,
# | | ^
# | 38 | const std::function<void(sycl::range<1> Range, int *Harray,
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 39 | sycl::buffer<int, 1> Buf)> &Function) {
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp:149:3: error: no matching function for call to 'TestHelper'
# | 149 | TestHelper(
# | | ^~~~~~~~~~
# | D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp:37:6: note: candidate function not viable: no known conversion from '(lambda at D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp:150:10)' to 'const std::function<void (sycl::range<1>, int *, sycl::buffer<int, 1>)>' for 2nd argument
# | 37 | void TestHelper(sycl::queue Q,
# | | ^
# | 38 | const std::function<void(sycl::range<1> Range, int *Harray,
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 39 | sycl::buffer<int, 1> Buf)> &Function) {
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp:1[87](https://github.com/intel/llvm/actions/runs/7587305754/job/20673950071#step:12:88):3: error: no matching function for call to 'TestHelper'
# | 187 | TestHelper(
# | | ^~~~~~~~~~
# | D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp:37:6: note: candidate function not viable: no known conversion from '(lambda at D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\DiscardEvents\discard_events_mixed_calls.cpp:1[88](https://github.com/intel/llvm/actions/runs/7587305754/job/20673950071#step:12:89):10)' to 'const std::function<void (sycl::range<1>, int *, sycl::buffer<int, 1>)>' for 2nd argument
# | 37 | void TestHelper(sycl::queue Q,
# | | ^
# | 38 | const std::function<void(sycl::range<1> Range, int *Harray,
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 39 | sycl::buffer<int, 1> Buf)> &Function) {
# | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 4 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--