[clang] [LifetimeSafety] Add origin tracking for lambda captures (PR #185216)

Zhijie Wang via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 8 19:16:26 PDT 2026


================
@@ -181,6 +181,14 @@ void FactsGenerator::VisitCXXConstructExpr(const CXXConstructExpr *CCE) {
     handleGSLPointerConstruction(CCE);
     return;
   }
+  if (const auto *RD = CCE->getType()->getAsCXXRecordDecl();
----------------
aeft wrote:

Redundant `getAsCXXRecordDecl()` call here (also inside `isGslPointerType`). Same as `hasOrigins`.

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


More information about the cfe-commits mailing list