Skip to content

Commit

Permalink
[Clang] Clarify error for implicit this capture in a kernel (intel#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aelovikov-intel authored and ianayl committed Jun 13, 2024
1 parent 829ff92 commit 42f2e49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clang/include/clang/Basic/DiagnosticSemaKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -8302,7 +8302,10 @@ let CategoryName = "Lambda Issue" in {
def note_var_explicitly_captured_here : Note<"variable %0 is"
"%select{| explicitly}1 captured here">;
def err_implicit_this_capture : Error<
"implicit capture of 'this' is not allowed for kernel functions">;
"implicit capture of 'this' is not allowed for kernel functions. "
"Either ensure the object is allocated in the memory available "
"on the device (e.g., shared USM memory) and capture it explicitly "
"or consider capturing the current object by copy ([*this]).">;
def err_lambda_member_access : Error<
"invalid attempt to access member of lambda">;

Expand Down

0 comments on commit 42f2e49

Please sign in to comment.