Skip to content

Conversation

@tahonermann
Copy link
Contributor

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.

@tahonermann tahonermann self-assigned this Jan 9, 2025
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jan 9, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 9, 2025

@llvm/pr-subscribers-clang

Author: Tom Honermann (tahonermann)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/122375.diff

1 Files Affected:

  • (modified) clang/test/SemaSYCL/sycl-kernel-entry-point-attr-appertainment.cpp (+1-1)
diff --git a/clang/test/SemaSYCL/sycl-kernel-entry-point-attr-appertainment.cpp b/clang/test/SemaSYCL/sycl-kernel-entry-point-attr-appertainment.cpp
index 5b3cf9853173dd..a87af7ca298ac3 100644
--- a/clang/test/SemaSYCL/sycl-kernel-entry-point-attr-appertainment.cpp
+++ b/clang/test/SemaSYCL/sycl-kernel-entry-point-attr-appertainment.cpp
@@ -170,7 +170,7 @@ struct B3 {
 };
 
 // expected-error@+1 {{'sycl_kernel_entry_point' attribute only applies to functions}}
-namespace bad4 [[clang::sycl_kernel_entry_point(BADKN<4>)]] {}
+namespace [[clang::sycl_kernel_entry_point(BADKN<4>)]] bad4 {}
 
 #if __cplusplus >= 202002L
 // expected-error@+2 {{'sycl_kernel_entry_point' attribute only applies to functions}}

@tahonermann tahonermann merged commit 03eb786 into llvm:main Jan 9, 2025
7 of 8 checks passed
BaiXilin pushed a commit to BaiXilin/llvm-project that referenced this pull request Jan 12, 2025
…pace declaration of a negative test. (llvm#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants