cor3ntin added a comment. @hubert.reinterpretcast I'll try to look at that but unless I'm mistaken, the wording excludes function parameters
> The fourth context is when a temporary object **other than a function > parameter** object is created in the for-range-initializer of a range-based > for statement. If such a temporary object would otherwise be destroyed at the > end of the for-range-initializer full-expression, the object persists for the > lifetime of the reference initialized by the for-range-initializer. I think that invalidates some of your examples? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139586/new/ https://reviews.llvm.org/D139586 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits