https://github.com/NeKon69 created https://github.com/llvm/llvm-project/pull/199887
cc: @usx95 >From ae80f6121721e863a08fe93562e0dfd99430f39c Mon Sep 17 00:00:00 2001 From: NeKon69 <[email protected]> Date: Wed, 27 May 2026 09:25:51 +0300 Subject: [PATCH] update --- clang/test/Sema/warn-lifetime-safety.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clang/test/Sema/warn-lifetime-safety.cpp b/clang/test/Sema/warn-lifetime-safety.cpp index bd61acdb8d8cb..d5f558c7918b3 100644 --- a/clang/test/Sema/warn-lifetime-safety.cpp +++ b/clang/test/Sema/warn-lifetime-safety.cpp @@ -3350,19 +3350,19 @@ struct [[gsl::Owner]] optional : __optional_storage_base<T> { const MyObj& return_optional_deref() { optional<MyObj> opt; - return *opt; // expected-warning {{address of stack memory is returned later}} \ + return *opt; // expected-warning {{stack memory associated with local variable 'opt' is returned}} \ // expected-note {{returned here}} } const MyObj& return_optional_value() { optional<MyObj> opt; - return opt.value(); // expected-warning {{address of stack memory is returned later}} \ + return opt.value(); // expected-warning {{stack memory associated with local variable 'opt' is returned}} \ // expected-note {{returned here}} } const int* return_optional_arrow() { optional<MyObj> opt; - return &opt->id; // expected-warning {{address of stack memory is returned later}} \ + return &opt->id; // expected-warning {{stack memory associated with local variable 'opt' is returned}} \ // expected-note {{returned here}} } _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
