forked from OSchip/llvm-project
![]() If a kernel template has a function as its template parameter, a device function should be allowed as template argument since a kernel can call a device function. However, currently if the kernel template is instantiated in a host function, clang will emit an error message saying the device function is an invalid candidate for the template parameter. This happens because clang checks the reference to the device function during parsing the template arguments. At this point, the template is not instantiated yet. Clang incorrectly assumes the device function is called by the host function and emits the error message. This patch fixes the issue by disabling checking of device function during parsing template arguments and deferring the check to the instantion of the template. At that point, the template decl is already available, therefore the check can be done against the instantiated function template decl. Differential Revision: https://reviews.llvm.org/D56411 llvm-svn: 355421 |
||
---|---|---|
.. | ||
Inputs | ||
add-inline-in-definition.cu | ||
addr-of-overloaded-fn.cu | ||
alias.cu | ||
amdgpu-attrs.cu | ||
amdgpu-size_t.cu | ||
amdgpu-windows-vectorcall.cu | ||
asm-constraints-device.cu | ||
asm-constraints-mixed.cu | ||
asm_delayed_diags.cu | ||
attr-declspec.cu | ||
attributes-on-non-cuda.cu | ||
bad-attributes.cu | ||
bad-calls-on-same-line.cu | ||
builtins.cu | ||
call-device-fn-from-host.cu | ||
call-host-fn-from-device.cu | ||
call-stack-for-deferred-err.cu | ||
config-type.cu | ||
cuda-builtin-vars.cu | ||
cuda-inherits-calling-conv.cu | ||
cxx11-kernel-call.cu | ||
device-var-init.cu | ||
error-includes-mode.cu | ||
exceptions.cu | ||
extern-shared.cu | ||
float16.cu | ||
function-overload.cu | ||
function-target.cu | ||
function-template-overload.cu | ||
global-initializers-host.cu | ||
gnu-inline.cu | ||
host-device-constexpr.cu | ||
implicit-copy.cu | ||
implicit-device-lambda.cu | ||
implicit-intrinsic.cu | ||
implicit-member-target-collision-cxx11.cu | ||
implicit-member-target-collision.cu | ||
implicit-member-target-inherited.cu | ||
implicit-member-target.cu | ||
inherited-ctor.cu | ||
kernel-call.cu | ||
launch_bounds.cu | ||
lit.local.cfg | ||
method-target.cu | ||
no-call-stack-for-immediate-errs.cu | ||
no-destructor-overload.cu | ||
no-host-device-constexpr.cu | ||
overloaded-delete.cu | ||
pr27778.cu | ||
qualifiers.cu | ||
reference-to-kernel-fn.cu | ||
trace-through-global.cu | ||
usual-deallocators.cu | ||
vararg.cu | ||
vla.cu |