[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 14:17:01 PDT 2024
================
@@ -439,6 +378,8 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call,
if (!Callee)
return;
+ bool EnableGSLAnalysis = !Callee->getASTContext().getDiagnostics().isIgnored(
----------------
usx95 wrote:
Can we move this to `VisitGSLPointerArg` and do all the calls to it unconditionally ?
This would remove the 3–4 usages in `if` conditions as well.
FWIW, I don't think this would effect performance with a few extra calls, as it only exists for optionally turning this analysis off.
https://github.com/llvm/llvm-project/pull/104906
More information about the cfe-commits
mailing list