================
@@ -4638,7 +4638,11 @@ class PackIndexingExpr final
Expr *getSelectedExpr() const {
UnsignedOrNone Index = getSelectedIndex();
assert(Index && "extracting the indexed expression of a dependant pack");
- return getTrailingObjects()[*Index];
+ // Resolved nodes store only the selected expansion; unresolved nodes store
+ // the full list and are indexed by the evaluated index.
+ return getTrailingObjects()[PackIndexingExprBits.TransformedExpressions ==
1
+ ? 0
+ : *Index];
----------------
cor3ntin wrote:
I think this is very brittle, I'd rather we store a bit saying we only store 1
expression.
https://github.com/llvm/llvm-project/pull/213790
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits