================
@@ -3406,25 +3406,39 @@ static QualType checkBuiltinTemplateIdType(
Sema &SemaRef, ElaboratedTypeKeyword Keyword, BuiltinTemplateDecl *BTD,
ArrayRef<TemplateArgument> Converted, SourceLocation TemplateLoc,
TemplateArgumentListInfo &TemplateArgs) {
+ TemplateParameterList *Params = BTD->getTemplateParameters();
+ unsigned RequiredArgs = Params->size();
+ if (Params->hasParameterPack()) {
+ if (Converted.size() < RequiredArgs)
+ return QualType();
+ } else {
+ if (Converted.size() != RequiredArgs)
+ return QualType();
+ }
----------------
Serosh-commits wrote:
> By the way, returning a null type is not signaling an error, this always
> means "stay dependent". If you want to signal an error, then you should
> produce a diagnostic.
sorry i was just focusing on the crash so i missed that sorry abt that i will
make sure every case has a diagnostic:(
https://github.com/llvm/llvm-project/pull/180407
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits