[PATCH] D114483: [SYCL] Add support for sycl_special_class attribute

Victor Lomuller via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 7 06:29:39 PST 2021


Naghasan added a comment.

Just a few comments



================
Comment at: clang/include/clang/Basic/AttrDocs.td:411-413
+The ``__attribute__((sycl_special_class))`` attribute is used in SYCL
+headers to indicate that a class or a struct needs additional implementation when
+it is passed from host to device.
----------------
I think this is a bit hard to follow if you don't know the SYCL kernel lowering process. Small suggestion to try to make this more self contained.


================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:8058
+  case ParsedAttr::AT_SYCLSpecialClass:
+    handleSimpleAttribute<SYCLSpecialClassAttr>(S, D, AL);
+    break;
----------------
Don't we need to have a validation for at least the `__init` function ? The doc says it is mandatory.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114483



More information about the cfe-commits mailing list