================
@@ -859,8 +861,10 @@ class PackDeductionScope {
     // by this pack expansion, then clear out the deduction.
     DeducedFromEarlierParameter = !Deduced[Index].isNull();
     DeducedPack Pack(Index);
-    Pack.Saved = Deduced[Index];
-    Deduced[Index] = TemplateArgument();
+    if (!FinishingDeduction) {
+      Pack.Saved = Deduced[Index];
+      Deduced[Index] = TemplateArgument();
+    }
----------------
zygoloid wrote:

A comment describing what `FinishingDeducing` is for would be useful. It looks 
like the intent is that in this mode we just gather information and don't 
update `Deduced` at all; if so, there's an update to `Deduced` in 
`finishConstruction` that you might have missed.

https://github.com/llvm/llvm-project/pull/100692
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to