Skip to content

Commit 03eb786

Browse files
authored
[SYCL] Correct misplaced sycl_kernel_entry_point attribute in a namespace declaration of a negative test. (#122375)
Commit 1a73654 added a missing diagnostic for incorrect placement of an attribute in a namespace declaration. This change corrects a SYCL test that inadvertently exercised the `sycl_kernel_entry_point` attribute in the wrong declaration location.
1 parent 328c3a8 commit 03eb786

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/test/SemaSYCL/sycl-kernel-entry-point-attr-appertainment.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ struct B3 {
170170
};
171171

172172
// expected-error@+1 {{'sycl_kernel_entry_point' attribute only applies to functions}}
173-
namespace bad4 [[clang::sycl_kernel_entry_point(BADKN<4>)]] {}
173+
namespace [[clang::sycl_kernel_entry_point(BADKN<4>)]] bad4 {}
174174

175175
#if __cplusplus >= 202002L
176176
// expected-error@+2 {{'sycl_kernel_entry_point' attribute only applies to functions}}

0 commit comments

Comments
 (0)