[PATCH] D91088: [CUDA][HIP] Fix capturing reference to host variable
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 9 10:19:08 PST 2020
tra added a subscriber: rsmith.
tra added a comment.
The use case in the tests makes sense, but I'd like to have a second opinion on whether it may have unintended consequences. Lambdas tend to bring interesting corner cases.
@rsmith Richard, do you see any issues with this approach?
================
Comment at: clang/test/CodeGenCUDA/lambda-reference-var.cu:61
+ [=](){
+ int &ref = global_device_var;
+ ref++;
----------------
Do we have current Sema tests that verify that we we would not allow accessing host vars here?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91088/new/
https://reviews.llvm.org/D91088
More information about the cfe-commits
mailing list