Commit c08b80e
authored
[Clang] Remove the PackExpansion restrictions for rewrite substitution (#126206)
When substituting for rewrite purposes, as in rebuilding constraints for
a synthesized deduction guide, it assumed that packs were in
PackExpansion* form, such that the instantiator could extract a pattern.
For type aliases CTAD, while rebuilding their associated constraints,
this might not be the case because we'll call
`TransformTemplateArgument()` for the alias template arguments, where
there might be cases e.g. a non-pack expansion type into a pack
expansion, so the assumption wouldn't hold.
This patch fixes that by making it treat the non-pack expansions as
direct patterns when rewriting.
Fixes #1247151 parent 2a7487c commit c08b80e
File tree
3 files changed
+63
-17
lines changed- clang
- lib/Sema
- test/AST
3 files changed
+63
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4905 | 4905 | | |
4906 | 4906 | | |
4907 | 4907 | | |
4908 | | - | |
| 4908 | + | |
4909 | 4909 | | |
4910 | 4910 | | |
4911 | 4911 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1466 | 1466 | | |
1467 | 1467 | | |
1468 | 1468 | | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
1469 | 1481 | | |
1470 | 1482 | | |
1471 | 1483 | | |
| |||
1627 | 1639 | | |
1628 | 1640 | | |
1629 | 1641 | | |
1630 | | - | |
| 1642 | + | |
1631 | 1643 | | |
1632 | 1644 | | |
1633 | 1645 | | |
| |||
2040 | 2052 | | |
2041 | 2053 | | |
2042 | 2054 | | |
2043 | | - | |
2044 | | - | |
2045 | | - | |
2046 | | - | |
2047 | | - | |
| 2055 | + | |
2048 | 2056 | | |
2049 | 2057 | | |
2050 | 2058 | | |
| |||
2125 | 2133 | | |
2126 | 2134 | | |
2127 | 2135 | | |
2128 | | - | |
2129 | | - | |
2130 | | - | |
2131 | | - | |
2132 | | - | |
| 2136 | + | |
2133 | 2137 | | |
2134 | 2138 | | |
2135 | 2139 | | |
| |||
2591 | 2595 | | |
2592 | 2596 | | |
2593 | 2597 | | |
2594 | | - | |
2595 | | - | |
2596 | | - | |
2597 | | - | |
2598 | | - | |
| 2598 | + | |
2599 | 2599 | | |
2600 | 2600 | | |
2601 | 2601 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
0 commit comments