[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu May 16 07:29:17 PDT 2024
================
@@ -4381,11 +4381,13 @@ class PackIndexingExpr final
PackIndexingExpr(QualType Type, SourceLocation EllipsisLoc,
SourceLocation RSquareLoc, Expr *PackIdExpr, Expr *IndexExpr,
- ArrayRef<Expr *> SubstitutedExprs = {})
+ ArrayRef<Expr *> SubstitutedExprs = {},
+ bool EmptyPack = false)
: Expr(PackIndexingExprClass, Type, VK_LValue, OK_Ordinary),
EllipsisLoc(EllipsisLoc), RSquareLoc(RSquareLoc),
SubExprs{PackIdExpr, IndexExpr},
- TransformedExpressions(SubstitutedExprs.size()) {
+ TransformedExpressions(EmptyPack ? size_t(-1)
----------------
AaronBallman wrote:
FYI: the types of the bit-fields need to be the same, otherwise they won't pack together as expected with MSVC.
https://github.com/llvm/llvm-project/pull/92385
More information about the cfe-commits
mailing list