[CUDA] Fixed false error reporting in case of calling H->G->HD->D.
authorArtem Belevich <tra@google.com>
Fri, 23 Mar 2018 19:49:03 +0000 (19:49 +0000)
committerArtem Belevich <tra@google.com>
Fri, 23 Mar 2018 19:49:03 +0000 (19:49 +0000)
commite2ae8b55108c08aa0718a020355de83e10897103
tree09c89597b7f1d0041c7e8ddcb00615060008b2b6
parent0a20cefffd3140666e29934df970561824e4c87e
[CUDA] Fixed false error reporting in case of calling H->G->HD->D.

Launching a kernel from the host code does not generate code for the
kernel itself. This fixes an issue with clang erroneously reporting
an error for a HD->D call from within the kernel.

Differential Revision: https://reviews.llvm.org/D44837

llvm-svn: 328362
clang/lib/Sema/SemaCUDA.cpp
clang/test/SemaCUDA/call-device-fn-from-host.cu