[PATCH] D56411: [CUDA][HIP][Sema] Fix template kernel with function as template parameter
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 9 21:48:33 PST 2019
rjmccall added a comment.
This patch still doesn't make any sense. You don't need to do any special validation when passing a function as a template argument. When Sema instantiates the template definition, it'll rebuild the expressions that refer to the template parameter, which will trigger the normal checking for whether those expressions are illegally referencing a host function from the device, etc. All you need to do is suppress that checking (whether it happens in a template definition or not) for references from non-potentially-evaluated contexts.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56411/new/
https://reviews.llvm.org/D56411
More information about the cfe-commits
mailing list