[PATCH] D60455: [SYCL] Add support for SYCL device attributes

Alexey Bader via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 12 07:43:21 PDT 2019


bader accepted this revision.
bader added inline comments.


================
Comment at: clang/test/SemaSYCL/device-attributes-on-non-sycl.cpp:5
+
+#if defined(EXPECT_WARNINGS)
+// expected-warning at +8 {{'sycl_kernel' attribute ignored}}
----------------
I think you can use `__SYCL_DEVICE_ONLY__` define instead.


================
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();
----------------
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.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60455





More information about the cfe-commits mailing list