================ @@ -12182,10 +12182,14 @@ QualType Sema::BuildStdInitializerList(QualType Element, SourceLocation Loc) { Args.addArgument(TemplateArgumentLoc(TemplateArgument(Element), Context.getTrivialTypeSourceInfo(Element, Loc))); + + QualType T = CheckTemplateIdType(TemplateName(StdInitializerList), Loc, Args); ---------------- ojhunt wrote:
We should probably keep this as an additional sanity check, however I think in this particular case the error is in the validity check in LookupStdInitializerList, where it is checking the minimum required template parameters, rather than ensuring real correctness. It should probably be doing `Params->size() != 1`, and ensuring that there isn't a parameter pack or any default template arguments. Changing those validity checks will also result in a much more direct error saying std::initializer_list is defined incorrectly. https://github.com/llvm/llvm-project/pull/132284 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits