[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 21 23:42:54 PDT 2024
================
@@ -439,6 +378,8 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call,
if (!Callee)
return;
+ bool EnableGSLAnalysis = !Callee->getASTContext().getDiagnostics().isIgnored(
----------------
hokein wrote:
> Can we move this to VisitGSLPointerArg and do all the calls to it unconditionally ?
Yeah, we can do that. The code is a bit tricky now, and I think keeping the `if (EnableGSLAnalysis)` condition make it easier to understand and reason about (explicitly indicating we're handling the GSL case).
https://github.com/llvm/llvm-project/pull/104906
More information about the cfe-commits
mailing list