Author: NeKon69 Date: 2026-05-27T06:59:54Z New Revision: f5bda2b94460d8439ed876d6486774d863ae989a
URL: https://github.com/llvm/llvm-project/commit/f5bda2b94460d8439ed876d6486774d863ae989a DIFF: https://github.com/llvm/llvm-project/commit/f5bda2b94460d8439ed876d6486774d863ae989a.diff LOG: [LifetimeSafety] Change new tests' warnings to new ones (#199887) cc: @usx95 Added: Modified: clang/test/Sema/warn-lifetime-safety.cpp Removed: ################################################################################ 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
