================
@@ -961,6 +961,7 @@ static const Expr 
*SubstituteConstraintExpressionWithoutSatisfaction(
 
   if (MLTAL.getNumSubstitutedLevels() == 0)
     return ConstrExpr;
+  MLTAL.setKind(TemplateSubstitutionKind::Rewrite);
----------------
mizvekov wrote:

The new difference introduced in this patch is that a Rewrite is depth 
preserving, while a specialization is not.

In this case, we want to rewrite a requires clause from another potential 
redeclaration to see if it matches, and confirm it really is a redeclaration.

If we don't preserve the depth here, this would trip a new assert, where we 
would be instantiating a requires clause at template depth 0, but then 
parenting it to a declaration at depth 1, which is incorrect.

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

Reply via email to