https://github.com/IamYJLee created https://github.com/llvm/llvm-project/pull/205964
The selected index of a PackIndexingType was not serialized, so on deserialization its canonical type was rebuilt as a dependent type, crashing CodeGen. Fixes #204479 >From d8316f5f8ae6d09c500f3b7a29cc68a21bc0d749 Mon Sep 17 00:00:00 2001 From: YoungJun Lee <[email protected]> Date: Fri, 26 Jun 2026 12:28:55 +0900 Subject: [PATCH] [clang][ast] Add an index property for PackIndexingType serialization --- clang/include/clang/AST/TypeProperties.td | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/AST/TypeProperties.td b/clang/include/clang/AST/TypeProperties.td index f16c10da430f9..e2168d0a00ff4 100644 --- a/clang/include/clang/AST/TypeProperties.td +++ b/clang/include/clang/AST/TypeProperties.td @@ -489,9 +489,12 @@ let Class = PackIndexingType in { def : Property<"expansions", Array<QualType>> { let Read = [{ node->getExpansions() }]; } + def : Property<"index", UnsignedOrNone> { + let Read = [{ node->getSelectedIndex() }]; + } def : Creator<[{ - return ctx.getPackIndexingType(pattern, indexExpression, isFullySubstituted, expansions); + return ctx.getPackIndexingType(pattern, indexExpression, isFullySubstituted, expansions, index); }]>; } _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
