[CUDA][HIP] Let lambda be host device by default
authorYaxun (Sam) Liu <yaxun.liu@amd.com>
Fri, 17 Apr 2020 03:51:40 +0000 (23:51 -0400)
committerYaxun (Sam) Liu <yaxun.liu@amd.com>
Wed, 8 Jul 2020 17:10:26 +0000 (13:10 -0400)
commit1eaad01046c88be6bf65265a2bcc53db5a5b48d0
tree8c21c03e530d13beec9af2802d9ca585809c2044
parent63b0f8c788d8c6978feb099fd6db8fe219c4d166
[CUDA][HIP] Let lambda be host device by default

This patch let lambda be host device by default and adds diagnostics for
capturing host variable by reference in device lambda.

Differential Revision: https://reviews.llvm.org/D78655
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaCUDA.cpp
clang/lib/Sema/SemaLambda.cpp
clang/test/CodeGenCUDA/lambda.cu [new file with mode: 0644]
clang/test/SemaCUDA/Inputs/cuda.h
clang/test/SemaCUDA/lambda.cu [new file with mode: 0644]