[clang] [clang] Decay types of function and constant template parameter packs (PR #132189)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 24 14:55:26 PDT 2025


================
@@ -1518,7 +1526,7 @@ NamedDecl *Sema::ActOnNonTypeTemplateParameter(Scope *S, Declarator &D,
 
   QualType T = CheckNonTypeTemplateParameterType(TInfo, D.getIdentifierLoc());
   if (T.isNull()) {
-    T = Context.IntTy; // Recover with an 'int' type.
+    T = TInfo->getType();
----------------
mizvekov wrote:

In what sort of context does this matter? Does the effect of this show up in any test?

Is it possible we might recover with something strange which will have weird effects or crash later, like undeduced auto?

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


More information about the cfe-commits mailing list