[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 13 19:00:34 PDT 2024
================
@@ -532,6 +533,11 @@ static void visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path,
}
} while (Init != Old);
+ if (auto *DAE = dyn_cast<CXXDefaultArgExpr>(Init)) {
+ Path.push_back({IndirectLocalPathEntry::DefaultArg, DAE, DAE->getParam()});
+ Init = DAE->getExpr();
+ }
----------------
higher-performance wrote:
Done, thanks!
https://github.com/llvm/llvm-project/pull/112047
More information about the cfe-commits
mailing list