hubert.reinterpretcast added a comment. In D139586#4363725 <https://reviews.llvm.org/D139586#4363725>, @cor3ntin wrote:
> @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? @cor3ntin, the examples I gave were for temporary objects created for binding to a reference (that, in turn, happens to be a function parameter). Those temporary objects are not function parameters. 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