We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45f751e commit ef59534Copy full SHA for ef59534
clang/test/SemaSYCL/lambda_implicit_capture_this.cpp
@@ -78,6 +78,18 @@ void Class::function() {
78
h.single_task<class CapturedOnHost1>([Lambda]() {
79
});
80
81
+ auto InnerLambda = [=]() {
82
+ int A = 2 + member; // expected-error {{implicit capture of 'this' is not allowed for kernel functions}}
83
+ };
84
+ auto ExternalLambda = [=]() {
85
+ InnerLambda();
86
87
+ q.submit([&](handler &h) {
88
+ // expected-note@+1 {{in instantiation of function template specialization}}
89
+ h.single_task<class CapturedOnHost2>([=]() {
90
+ NestedLambda();
91
+ });
92
93
}
94
95
int main(int argc, char *argv[]) {
0 commit comments