yaxunl marked an inline comment as done.
yaxunl 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 manage
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
yaxunl created this revision.
yaxunl added a reviewer: tra.
yaxunl requested review of this revision.
HIP currently diagnose capture of `this` pointer in device lambda in
host member functions. If `this` pointer points to managed memory,
it can be used in both device and host functions. Under this