[clang] [LifetimeSafety] Track origins for lifetimebound calls returning record types (PR #187917)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 24 05:57:13 PDT 2026
usx95 wrote:
> Reference-returning lifetimebound function copied into value: not tracked
This should not just be fine but also required in practice. Consider:
`const std::string& max(const std::string&& [[lb]], const std::string& [[lb]])`
It is fine to have a copy of the returned reference, and the reference only has the lifetime constraints.
https://github.com/llvm/llvm-project/pull/187917
More information about the cfe-commits
mailing list