bader added inline comments.

================
Comment at: clang/test/SemaSYCL/device-attrubutes.cpp:8-11
+__attribute((sycl_kernel)) void foo();
+__attribute((sycl_device)) void foo1();
+[[clang::sycl_kernel]] void foo2();
+[[clang::sycl_device]] void foo3();
----------------
Fznamznon wrote:
> bader wrote:
> > This duplicates clang/test/SemaSYCL/device-attributes-on-non-sycl.cpp.
> > Maybe it make sense to test case when both attributes are applied to the 
> > same function.
> From current documentation: sycl_kernel can be applied to function which can 
> be directly called by the host and will be compiled for device, sycl_device 
> applies to device functions which **cannot** be directly called by the 
> host... 
> I think if we want add this test case we need clarify how this case will be 
> handled by the compiler.
> From current documentation: sycl_kernel can be applied to function which can 
> be directly called by the host and will be compiled for device, sycl_device 
> applies to device functions which cannot be directly called by the host... 
> I think if we want add this test case we need clarify how this case will be 
> handled by the compiler.

I would expect `sycl_kernel` to supersede `sycl_device` attribute. Basically 
`sycl_kernel` include functionality of `sycl_device` attribute and provides 
additional host accessibility.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60455/new/

https://reviews.llvm.org/D60455



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to