llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: NeKon69 <details> <summary>Changes</summary> cc: @<!-- -->usx95 --- Full diff: https://github.com/llvm/llvm-project/pull/199887.diff 1 Files Affected: - (modified) clang/test/Sema/warn-lifetime-safety.cpp (+3-3) ``````````diff 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}} } `````````` </details> https://github.com/llvm/llvm-project/pull/199887 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
