================
@@ -749,132 +759,124 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern,
SourceLocation EllipsisLoc,
PackExpansionExpr(Context.DependentTy, Pattern, EllipsisLoc,
NumExpansions);
}
+static bool IsUnexpandedPackExpansion(const TemplateArgument &TA) {
+ if (!TA.isPackExpansion())
+ return false;
+
+ if (TA.getKind() == TemplateArgument::Type)
+ return !TA.getAsType()->getAs<PackExpansionType>()->getNumExpansions();
+
+ if (TA.getKind() == TemplateArgument::Expression)
+ return !cast<PackExpansionExpr>(TA.getAsExpr())->getNumExpansions();
+
+ return !TA.getNumTemplateExpansions();
+}
----------------
cor3ntin wrote:
Can you leave a comment here? This is a bit confusing.
Actually, I think having it as a lambda, like in the current code, might be
clearer.
It's not just that they are unexpended, they are also unresolvable at that
point.
https://github.com/llvm/llvm-project/pull/121044
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits