[clang] [LifetimeSafety] Add parameter lifetime tracking in CFG (PR #169320)

Yitzhak Mandelbaum via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 25 08:53:13 PST 2025


================
@@ -2246,6 +2252,9 @@ LocalScope* CFGBuilder::addLocalScopeForVarDecl(VarDecl *VD,
   if (!VD->hasLocalStorage())
     return Scope;
 
+  if (isa<ParmVarDecl>(VD) && VD->getType()->isReferenceType())
----------------
ymand wrote:

Maybe comment on why we exclude this case?

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


More information about the cfe-commits mailing list