================
@@ -142,13 +158,18 @@ int *direct_return() {
   int i = 5;
   return test_func(&i);
   // expected-warning@-1 {{Returning value bound to 'i' that will go out of 
scope}}
-  // expected-warning@-2 {{address of stack memory associated with local 
variable 'i' returned}}
+  // expected-note@-2    {{Value's lifetime bound to the lifetime of 'i' here}}
+  // expected-note@-3    {{Lifetime of 'i' ended here}}
+  // expected-warning@-4 {{address of stack memory associated with local 
variable 'i' returned}}
----------------
isuckatcs wrote:

Nit: some of these messages starts with a capital letter, but others start with 
lowecase. Is this something to worry about?

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

Reply via email to