================
@@ -1428,7 +1440,8 @@ void range_based_for_use_after_scope() {
   View v;
   {
     MyObjStorage s;
-    for (const MyObj &o : s) { // expected-warning {{local variable 's' does 
not live long enough}}
+    for (const MyObj &o : s) { // expected-warning {{local variable 's' does 
not live long enough}} \
+                               // expected-note {{local variable '__range2' 
aliases the storage of local variable 's'}}
----------------
NeKon69 wrote:

Hmmm, maybe we can do something about this? This is a hidden variable name 
after all, I don't think it should show up in the diags. I don't think changing 
this in this PR would make a lot of sense though.

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

Reply via email to