Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Clang] Clarify error for implicit this capture in a kernel #14100

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading