================
@@ -3406,10 +3406,16 @@ static QualType checkBuiltinTemplateIdType(
Sema &SemaRef, ElaboratedTypeKeyword Keyword, BuiltinTemplateDecl *BTD,
ArrayRef<TemplateArgument> Converted, SourceLocation TemplateLoc,
TemplateArgumentListInfo &TemplateArgs) {
+ if (Converted.size() < BTD->getTemplateParameters()->size())
+ return QualType();
+
ASTContext &Context = SemaRef.getASTContext();
switch (BTD->getBuiltinTemplateKind()) {
case BTK__make_integer_seq: {
+ assert(Converted.size() == 3);
----------------
ojhunt wrote:
I think this assertion will fire if you do `__make_integer_seq<a,b,c,d,e>` or
similar. It's possible the above size check should be `Converted.size() ==
BTD->getTemplateParameters()->size()` unless the last parameter is variadic, in
which case it should permit more parameters.
https://github.com/llvm/llvm-project/pull/180407
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits