================
@@ -5218,7 +5218,17 @@ bool TreeTransform<Derived>::TransformTemplateArguments(
       std::optional<ForgetSubstitutionRAII> ForgetSubst;
       if (Info.ExpandUnderForgetSubstitions)
         ForgetSubst.emplace(getDerived());
-      for (unsigned I = 0; I != *Info.NumExpansions; ++I) {
+
+      unsigned Start, End;
+      if (ExpansionIndex.has_value()) {
+        Start = *ExpansionIndex;
+        End = Start + 1;
----------------
cor3ntin wrote:

This is the meat of the change actually :sweat_smile: 

For each expansion in the fold expanded constraint (SemaConcept.cpp, L903 or 
so), we substitute in the parameter mapping but at that point, we want the 
mapping to correspond to an expansion, not keep every expansions.
Does that make sense?

https://github.com/llvm/llvm-project/pull/200185
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to