[clang] [LifetimeSafety] Track origins through std::function (PR #191123)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 12 23:37:21 PDT 2026


================
@@ -2531,3 +2531,98 @@ int *noreturn_dead_nested(bool cond, bool cond2, int *num) {
 }
 
 } // namespace conditional_operator_control_flow
+
+namespace callable_wrappers {
+
+std::function<void()> direct_return() {
----------------
usx95 wrote:

nit: add a test like this which does not capture any local.

https://github.com/llvm/llvm-project/pull/191123


More information about the cfe-commits mailing list