[clang] [clang] fix partial ordering of NTTP packs (PR #134461)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 14 15:35:34 PDT 2025


================
@@ -7085,18 +7102,24 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
                                    ? Context.getIntWidth(IntegerType)
                                    : Context.getTypeSize(IntegerType));
 
-      SugaredConverted = TemplateArgument(Context, Value, ParamType);
-      CanonicalConverted =
-          TemplateArgument(Context, Value, Context.getCanonicalType(ParamType));
-      return ArgResult;
+      if (ArgPE) {
----------------
mizvekov wrote:

Right, that's not possible. At some point in the development of this patch, I changed the `StrictCheck` mode to always use the C++17 rules for converted constant expressions, and so the changes to this function from this point forward became unnecessary, but I must have forgotten to go back and remove this.

I posted a patch to clean this up here: https://github.com/llvm/llvm-project/pull/158515

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


More information about the cfe-commits mailing list