[clang] [LifetimeSafety] Revamp how accesses and uses are handled (PR #225799)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 24 05:52:41 PDT 2026
================
@@ -2836,11 +2834,8 @@ S getS2(const std::string &a [[clang::lifetimebound]], const std::string &b [[cl
S multiple_lifetimebound_params() {
std::string str{"abc"};
S s = getS2(str, std::string("temp")); // expected-warning {{stack memory associated with local variable 'str' is returned}} \
----------------
usx95 wrote:
Is deleting the alias information
`// expected-note {{result of call to 'getS2' aliases the storage of temporary object because parameter 'b' is marked as lifetimebound}} \`
intentional ?
https://github.com/llvm/llvm-project/pull/225799
More information about the cfe-commits
mailing list