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

Kashika Akhouri via cfe-commits cfe-commits at lists.llvm.org
Thu May 21 03:45:04 PDT 2026


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

As discussed and mentioned in the above comments, I'll update `LifetimeAnnotatedOriginTypeCollector` in a follow-up PR, post-which the simple structs should show warnings in `clang/test/Sema/warn-lifetime-analysis-capture-by.cpp`.

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


More information about the cfe-commits mailing list