NeKon69 wrote:

I also wanted to add a test like

```
void test() {
  View v;
  for (const MyObj &o : id( // cxx20-note {{later used here}}
                            MyObjStorage())) { // cxx20-warning {{local 
temporary object does not live long enough}} cxx20-note {{destroyed here}}
    v = o;
  }
  v.use();
}
```

But this only warns pre c++23, and also breaks too many tests in the same file. 
I figured it's not worth it to create another file just for this test.

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

Reply via email to