vbvictor wrote: I feel this should be part of [lifetime safety analysis](https://clang.llvm.org/docs/LifetimeSafety.html), but it currently don't model lambda captures/threads I think? https://github.com/llvm/llvm-project/pull/203757