Issue 203886
Summary [LifetimeSafety] Support globally capturing constructor like std::thread, std::async
Labels clang:temporal-safety
Assignees
Reporter usx95
    See https://github.com/llvm/llvm-project/pull/203757

```cpp
void test_thread() {
  int x = 0;
  std::thread t2([x]() { int y = x; });
}
​
void test_async_function() {
  int x = 0;
​
  std::async([&x]() { x = 1; });
}
​```
cc: @kashika0112
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to