|
1 | 1 | // RUN: %clangxx -fsycl -fsycl-device-only -std=c++17 -fno-sycl-unnamed-lambda -isystem %sycl_include/sycl -Xclang -verify -fsyntax-only %s -Xclang -verify-ignore-unexpected=note
|
| 2 | + |
| 3 | +// NOTE: Due to rounded kernels, some parallel_for cases may issue two error |
| 4 | +// diagnostics. |
| 5 | + |
2 | 6 | #include <sycl/sycl.hpp>
|
3 | 7 |
|
4 | 8 | int main() {
|
5 | 9 | sycl::queue q;
|
6 | 10 |
|
7 |
| - // expected-error@sycl/kernel.hpp:* {{No kernel name provided without -fsycl-unnamed-lambda enabled!}} |
| 11 | + // expected-error-re@sycl/handler.hpp:* {{unnamed type '{{.*}}' is invalid; provide a kernel name, or use '-fsycl-unnamed-lambda' to enable unnamed kernel lambdas}} |
8 | 12 | // expected-note@+1 {{in instantiation of function template}}
|
9 | 13 | q.single_task([=](){});
|
10 | 14 |
|
11 |
| - // expected-error@sycl/kernel.hpp:* {{No kernel name provided without -fsycl-unnamed-lambda enabled!}} |
| 15 | + // expected-error-re@sycl/handler.hpp:* {{unnamed type 'sycl::detail::RoundedRangeKernel<{{.*}}>' is invalid; provide a kernel name, or use '-fsycl-unnamed-lambda' to enable unnamed kernel lambdas}} |
| 16 | + // expected-error-re@sycl/handler.hpp:* {{unnamed type '{{.*}}' is invalid; provide a kernel name, or use '-fsycl-unnamed-lambda' to enable unnamed kernel lambdas}} |
12 | 17 | // expected-note@+1 {{in instantiation of function template}}
|
13 | 18 | q.parallel_for(sycl::range<1>{1}, [=](sycl::item<1>) {});
|
14 | 19 |
|
15 | 20 | q.submit([&](sycl::handler &cgh) {
|
16 |
| - // expected-error@sycl/kernel.hpp:* {{No kernel name provided without -fsycl-unnamed-lambda enabled!}} |
| 21 | + // expected-error-re@sycl/handler.hpp:* {{unnamed type '{{.*}}' is invalid; provide a kernel name, or use '-fsycl-unnamed-lambda' to enable unnamed kernel lambdas}} |
17 | 22 | // expected-note@+1 {{in instantiation of function template}}
|
18 | 23 | cgh.single_task([=](){});
|
19 | 24 |
|
20 |
| - // expected-error@sycl/kernel.hpp:* {{No kernel name provided without -fsycl-unnamed-lambda enabled!}} |
| 25 | + // expected-error-re@sycl/handler.hpp:* {{unnamed type 'sycl::detail::RoundedRangeKernel<{{.*}}>' is invalid; provide a kernel name, or use '-fsycl-unnamed-lambda' to enable unnamed kernel lambdas}} |
| 26 | + // expected-error-re@sycl/handler.hpp:* {{unnamed type '{{.*}}' is invalid; provide a kernel name, or use '-fsycl-unnamed-lambda' to enable unnamed kernel lambdas}} |
21 | 27 | // expected-note@+1 {{in instantiation of function template}}
|
22 | 28 | cgh.parallel_for(sycl::range<1>{1}, [=](sycl::item<1>) {});
|
23 | 29 |
|
24 |
| - // expected-error@sycl/kernel.hpp:* {{No kernel name provided without -fsycl-unnamed-lambda enabled!}} |
| 30 | + // expected-error-re@sycl/handler.hpp:* {{unnamed type '{{.*}}' is invalid; provide a kernel name, or use '-fsycl-unnamed-lambda' to enable unnamed kernel lambdas}} |
25 | 31 | // expected-note@+1 {{in instantiation of function template}}
|
26 | 32 | cgh.parallel_for_work_group(sycl::range<1>{1}, [=](sycl::group<1>) {});
|
27 | 33 | });
|
|
0 commit comments