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

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Fri May 1 10:42:31 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");
----------------
mizvekov wrote:

Yeah, that was the first thing I thought of, but we have the horrible situation with CreateDeserialized, and then initializing the template parameter field directly through friendship.

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


More information about the cfe-commits mailing list