================
@@ -3406,6 +3406,10 @@ static QualType checkBuiltinTemplateIdType(
     Sema &SemaRef, ElaboratedTypeKeyword Keyword, BuiltinTemplateDecl *BTD,
     ArrayRef<TemplateArgument> Converted, SourceLocation TemplateLoc,
     TemplateArgumentListInfo &TemplateArgs) {
+  if (llvm::any_of(Converted,
+                   [](const TemplateArgument &A) { return A.isDependent(); }))
+    return QualType();
----------------
Serosh-commits wrote:

That's a great point. If the arity is already insufficient, the template is 
invalid regardless of dependency. I can update the top-level gatekeeper to also 
check Converted.size() against  getMinRequiredArguments()
 this would catch these cases early and ensure that the case-specific internal 
assertions are always safe. Does that sound good to you?

https://github.com/llvm/llvm-project/pull/180407
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to