================
@@ -70,7 +70,14 @@ struct alignas(ConstraintAlignment) AtomicConstraint {
     // We do not actually substitute the parameter mappings into the
     // constraint expressions, therefore the constraint expressions are
     // the originals, and comparing them will suffice.
-    if (ConstraintExpr != Other.ConstraintExpr)
+    if (AC.ConstraintExpr != Other.AC.ConstraintExpr)
+      return false;
+
+    // FIXME: As the normalization cache doesn't take
+    // ArgumentPackSubstitutionIndex into account,
+    // this won't have an effect.
+    if (AC.ArgumentPackSubstitutionIndex !=
+        Other.AC.ArgumentPackSubstitutionIndex)
----------------
cor3ntin wrote:

Github ate my comment.
This looks wrong. 

An atomic constraint should be considered equivalent to another for the purpose 
of subsumption if the (transformed) expression is the same, even if it is 
expanded from a different pack, or not expanded at all.

The only thing we should compare is
 - are they the same expression
 - do they have the same mapping

If the mapping has packs of different sizes etc _that_ should be what makes 
subsumption fail.

So I would expect `AtomicConstraint` not to change.

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

Reply via email to