[PATCH] D108493: [HIP] Allow capture this pointer in device lambda
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 20 15:47:55 PDT 2021
tra added inline comments.
================
Comment at: clang/lib/Sema/SemaCUDA.cpp:881-882
+ } else if (Capture.isThisCapture() && !LangOpts.HIP) {
+ // Capture of this pointer is allowed for HIP since this pointer may be
+ // pointing to managed memory which is accessible on both device and
+ // host sides.
----------------
I assume there's no easy way to tell if it's a managed pointer or not.
Capturing a non-managed pointer would still be bad.
Should we make it a warning instead?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108493/new/
https://reviews.llvm.org/D108493
More information about the cfe-commits
mailing list