================ @@ -402,6 +402,20 @@ bool Sema::DiagnoseUnexpandedParameterPack(Expr *E, if (!E->containsUnexpandedParameterPack()) return false; + // Exception: The `CollectUnexpandedParameterPacksVisitor` collects nothing + // from a FunctionParmPackExpr. In the context where the collector is being + // used such as `collectUnexpandedParameterPacks`, this type of expression + // is not expected to be collected. + // + // Nonetheless, this function for diagnosis is still called anyway during + // template instantiation, with an expression of such a type if we're inside a + // lambda with unexpanded parameters. + // + // Rule out this case to prevent the assertion failure. + if (auto *Expr = dyn_cast<FunctionParmPackExpr>(E); + Expr && getEnclosingLambda()) ---------------- zyn0217 wrote:
Thanks, I almost forget it ;) https://github.com/llvm/llvm-project/pull/69224 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits