Issue 203888
Summary [LifetimeSafety] Support container of function wrapper (e.g. std::vector<std::function>)
Labels clang:temporal-safety
Assignees
Reporter usx95
    See https://github.com/llvm/llvm-project/pull/203757

```cpp
void local_vector() {
  std::vector<std::function<int()>> LocalFns;
​  { 
    int z;
    LocalFns.emplace_back([&z]() -> int { return z; });
  }
  (void)LocalFns; // use-after-scope of 'z'
}
```
Same for global vector of fns.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to