[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 22 06:58:35 PST 2024


================
@@ -238,3 +239,236 @@ void init_capture_init_list() {
   // CHECK: call {{.*}}dtor
   // CHECK: }
 }
+
+namespace P2718R0 {
----------------
yronglin wrote:

agree, I have compiled this case, Currently, clang will not extending lifetime of temporaries in this case.

https://github.com/llvm/llvm-project/pull/76361


More information about the cfe-commits mailing list