================
@@ -6649,6 +6649,9 @@ 
TreeTransform<Derived>::TransformPackIndexingType(TypeLocBuilder &TLB,
     }
   }
 
+  // We may be doing this in the context of expanding the Pattern. Forget that
+  // because it has been handled above.
+  Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(getSema(), -1);
----------------
cor3ntin wrote:

```suggestion
  // A pack indexing type can appear in a larger pack expansion, 
  // e.g `Pack...[pack_of_indexes]...`
  // so we need to temporarily disable substitution of pack elements
  Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(getSema(), -1);
```

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

Reply via email to