[clang] [LifetimeSafety] Track origins for lifetimebound calls returning record types (PR #187917)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 25 04:09:34 PDT 2026
================
@@ -178,6 +190,10 @@ class OriginManager {
llvm::DenseMap<const clang::ValueDecl *, OriginList *> DeclToList;
llvm::DenseMap<const clang::Expr *, OriginList *> ExprToList;
std::optional<OriginList *> ThisOrigins;
+ /// Types that are not inherently pointer-like but require origin tracking
+ /// because they are returned from functions with [[clang::lifetimebound]]
----------------
Xazax-hun wrote:
Small nit, I think these are not specific to `lifetimebound` only, `lifetime_capture_by` has similar effects. It is fine to not handle that in this PR, but I wonder if the comment should reflect this.
https://github.com/llvm/llvm-project/pull/187917
More information about the cfe-commits
mailing list