================
@@ -2337,8 +2374,9 @@ auto capture_int_by_value() {
 auto capture_view_by_value() {
   MyObj obj;
   View v(obj); // expected-warning {{stack memory associated with local 
variable 'obj' is returned}}
-  auto lambda = [v]() { return v; };
-  return lambda; // expected-note {{returned here}}
+  auto lambda = [v]() { return v; }; // expected-note {{local variable 'v' 
aliases the storage of local variable 'obj'}}
+  return lambda; // expected-note {{returned here}} \
+                 // expected-note {{local variable 'lambda' aliases the 
storage of local variable 'obj'}}
----------------
NeKon69 wrote:

There are still a couple of unaligned diagnostics starting from here.

https://github.com/llvm/llvm-project/pull/212083
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to