[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 14 10:24:54 PDT 2024
================
@@ -465,17 +466,27 @@ static void visitFunctionCallArguments(IndirectLocalPath &Path, Expr *Call,
for (unsigned I = 0,
N = std::min<unsigned>(Callee->getNumParams(), Args.size());
I != N; ++I) {
+ Expr *Arg = Args[I];
+ auto *DAE = dyn_cast<CXXDefaultArgExpr>(Arg);
+ if (DAE) {
+ Path.push_back(
+ {IndirectLocalPathEntry::DefaultArg, DAE, DAE->getParam()});
+ Arg = DAE->getExpr();
+ }
----------------
higher-performance wrote:
Done, thanks!
https://github.com/llvm/llvm-project/pull/112047
More information about the cfe-commits
mailing list