https://llvm.org/bugs/show_bug.cgi?id=26481
Bug ID: 26481 Summary: CUDA __global__ lambdas shouldn't be allowed to capture by reference Product: clang Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: justin.le...@gmail.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified The following CUDA code should be an error, as __global__ lambdas aren't allowed to capture variables by reference. void foo() { int v; auto x = [&v] () __global__ { }; } Today it's a different error: test.cu:3:17: error: kernel function type '<dependent type> () const' must have void return type auto x = [&v] () __global__ { }; We get this error with or without a capture-by-reference, but that's a separate issue. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs