[clang] [LifetimeSafety] Revamp how accesses and uses are handled (PR #225799)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 24 06:14:59 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}} \
----------------
Xazax-hun wrote:

This is a regression as returning a value no longer generates a use fact, only an escape fact. And the plumbing for the escape fact for building the alias info was not yet done. I plan to address this in a follow-up. 

https://github.com/llvm/llvm-project/pull/225799


More information about the cfe-commits mailing list