================
@@ -316,6 +330,13 @@ TemplateNameKind Sema::isTemplateName(Scope *S,
     }
   }
 
+  if (isPackProducingBuiltinTemplateName(Template) &&
+      S->getTemplateParamParent() == nullptr) {
+    Diag(Name.getBeginLoc(), diag::err_builtin_pack_outside_template);
+    // Recover by returning the template, even though we would never be able to
+    // substitute it.
+  }
----------------
ilya-biryukov wrote:

Done.

https://github.com/llvm/llvm-project/pull/106730
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to