[clang] [LifetimeSafety] Add support for lifetime capture_by (PR #196884)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Mon May 11 08:20:17 PDT 2026


================
@@ -3284,3 +3284,76 @@ void assign_non_capturing_to_function_ref(function_ref &r) {
 }
 
 } // namespace GH126600
+
+//===----------------------------------------------------------------------===//
----------------
usx95 wrote:

Can you also try to turn this on in `clang/test/Sema/warn-lifetime-analysis-capture-by.cpp`. We might need to add "uses" of pointer to trigger the warning.

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


More information about the cfe-commits mailing list