bader added inline comments.

================
Comment at: clang/include/clang/Basic/Attr.td:1034
+  let Spellings = [Clang<"sycl_kernel">];
+  let Subjects = SubjectList<[Function]>;
+  let LangOpts = [SYCL];
----------------
aaron.ballman wrote:
> Shouldn't this be `FunctionTemplate` instead?
@aaron.ballman, I'm not sure.
I tried to use FunctionTemplate instead of Function, but I get following 
warning:
```
warning: 'sycl_kernel' attribute only applies to redeclarable templates
```
I investigated this a little and Sema passes Function declaration instead of 
FunctionTemplate to the function validating the attribute appertains to the 
right subject. I think it's because attributes are handled before 
FunctionTemplateDecl node is created.
Do we have an infrastructure to handle "FunctionTemplate" attributes?

I can't find any other attribute with FunctionTemplate subject to learn from...


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