[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 20 10:09:26 PDT 2024


================
@@ -478,13 +449,32 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call,
       CheckCoroObjArg = false;
     if (implicitObjectParamIsLifetimeBound(Callee) || CheckCoroObjArg)
       VisitLifetimeBoundArg(Callee, ObjectArg);
+    else if (EnableLifetimeWarnings) {
----------------
usx95 wrote:

The name `EnableLifetimeWarnings` has been confusing to me given that this analysis is only about lifetimes.
Would it be correct to replace this with something like `EnableGSLAnalysis` ? From the usage it looks to be used only for GSL pointer analysis.



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


More information about the cfe-commits mailing list