[clang] [clang] fix alias ctad producing function template with no template parameters (PR #195303)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri May 1 10:40:52 PDT 2026


================
@@ -1551,6 +1559,7 @@ VarTemplatePartialSpecializationDecl::Create(
     SourceLocation IdLoc, TemplateParameterList *Params,
     VarTemplateDecl *SpecializedTemplate, QualType T, TypeSourceInfo *TInfo,
     StorageClass S, ArrayRef<TemplateArgument> Args) {
+  assert(!Params->empty() && "template with no template parameters");
----------------
erichkeane wrote:

Not sure if this hits the whole list, but: Could we instead put this assert in the `ctor` of `TemplateDecl` (or `RedeclarableTemplateDecl`?)?   

https://github.com/llvm/llvm-project/pull/195303


More information about the cfe-commits mailing list