================
@@ -2157,11 +2157,11 @@ void ASTStmtWriter::VisitSizeOfPackExpr(SizeOfPackExpr 
*E) {
 void ASTStmtWriter::VisitPackIndexingExpr(PackIndexingExpr *E) {
   VisitExpr(E);
   Record.push_back(E->TransformedExpressions);
+  Record.push_back(E->EmptyPack);
   Record.AddSourceLocation(E->getEllipsisLoc());
   Record.AddSourceLocation(E->getRSquareLoc());
   Record.AddStmt(E->getPackIdExpression());
   Record.AddStmt(E->getIndexExpr());
-  Record.push_back(E->TransformedExpressions);
----------------
zyn0217 wrote:
> Weird that this did not cause any issues...

I think that's just because we didn't test it (nor does anyone... use it at 
scale). Anyhow, I contrived an example that would previously crash in 
`clang/test/PCH/pack_indexing.cpp`:
```cpp
template <int I, auto...V>
decltype(V...[I]) foo() { return V...[I]; }

void fn1() {
  foo<1, 2, 3, 4>();
}
```

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

Reply via email to