[clang] [SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute. (PR #152403)

Alexey Bader via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 4 15:10:16 PST 2026


================
@@ -64,9 +64,38 @@ class SemaSYCL : public SemaBase {
   void handleKernelAttr(Decl *D, const ParsedAttr &AL);
   void handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL);
 
+  /// Issues a deferred diagnostic if use of the declaration designated
+  /// by 'D' is invalid in a device context.
+  void CheckDeviceUseOfDecl(NamedDecl *D, SourceLocation Loc);
----------------
bader wrote:

Looking at the naming patterns in the surrounding code:
```c++
void handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL);
void CheckSYCLExternalFunctionDecl(FunctionDecl *FD);
```
Should we rename the first parameter of `CheckDeviceUseOfDecl` from its current name to `ND` to maintain consistency? It appears the codebase follows a pattern of using single/double letter parameter names (like `D`, `FD`) for declaration-type parameters in similar functions.

https://github.com/llvm/llvm-project/pull/152403


More information about the cfe-commits mailing list