[PATCH] D60455: [SYCL] Implement SYCL device code outlining
Alexey Bader via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 7 11:55:27 PST 2019
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
More information about the cfe-commits
mailing list