[CUDA] Make lambdas inherit __host__ and __device__ attributes from the scope in...
authorJustin Lebar <jlebar@google.com>
Fri, 30 Sep 2016 17:14:53 +0000 (17:14 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 30 Sep 2016 17:14:53 +0000 (17:14 +0000)
commit7ca116cacfcf3d33bb0a17a76bd8495557e2b6fb
tree37d68d77ad3ef7397af18af9687700f7468556b6
parent0fad0ba6a9b0e4900a6e247831c83f665bde2a6b
[CUDA] Make lambdas inherit __host__ and __device__ attributes from the scope in which they're created.

Summary: NVCC compat.  Fixes bug 30567.

Reviewers: tra

Subscribers: cfe-commits, rnk

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

llvm-svn: 282880
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaCUDA.cpp
clang/lib/Sema/SemaLambda.cpp
clang/test/SemaCUDA/implicit-device-lambda-hd.cu [new file with mode: 0644]
clang/test/SemaCUDA/implicit-device-lambda.cu [new file with mode: 0644]