================
@@ -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'}}
----------------
suoyuan666 wrote:
How about checking `Decl->isImplicit()`? This check has already been added in
`shouldShowInAliasChain` in the latest change.
https://github.com/llvm/llvm-project/pull/204592
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits