tra accepted this revision. tra added a comment. LGTM. Thank you for adding the checks for capturing lambdas and for putting this behind the flag. I've asked @rsmith to chime in in case there's anything else about the lambdas we need to deal with. Please wait a day or two before landing the patch to give him a chance to reply.
================ Comment at: clang/test/SemaCUDA/lambda.cu:25-35 + kernel<<<1,1>>>([&](){ hd(); }); + // expected-note@-1 {{in instantiation of function template specialization 'kernel<(lambda at}} + // expected-note@-2 {{candidate function not viable: call to __host__ function from __global__ function}} + + kernel<<<1,1>>>([=, &b](){ hd(); }); + // expected-note@-1 {{in instantiation of function template specialization 'kernel<(lambda at}} + // expected-note@-2 {{candidate function not viable: call to __host__ function from __global__ function}} ---------------- We may need a better diagnostic for this. Here we've correctly rejected captured lambdas, but the diagnostic is a generic 'can't use that'. If would be helpful to let user know that we can't use that because of the capturing lambdas. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78655/new/ https://reviews.llvm.org/D78655 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits