Commit 2ce86d8
committed
[Clang] Remove the PackExpansion restrictions for rewrite substitution
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 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.1 parent 83a8bb3 commit 2ce86d8
File tree
3 files changed
+60
-8
lines changed- clang
- lib/Sema
- test/AST
3 files changed
+60
-8
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 | |
|---|---|---|---|
| |||
1627 | 1627 | | |
1628 | 1628 | | |
1629 | 1629 | | |
1630 | | - | |
| 1630 | + | |
1631 | 1631 | | |
1632 | 1632 | | |
1633 | 1633 | | |
| |||
2041 | 2041 | | |
2042 | 2042 | | |
2043 | 2043 | | |
2044 | | - | |
| 2044 | + | |
2045 | 2045 | | |
2046 | | - | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
2047 | 2049 | | |
2048 | 2050 | | |
2049 | 2051 | | |
| |||
2126 | 2128 | | |
2127 | 2129 | | |
2128 | 2130 | | |
2129 | | - | |
| 2131 | + | |
2130 | 2132 | | |
2131 | | - | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
2132 | 2136 | | |
2133 | 2137 | | |
2134 | 2138 | | |
| |||
2592 | 2596 | | |
2593 | 2597 | | |
2594 | 2598 | | |
2595 | | - | |
| 2599 | + | |
2596 | 2600 | | |
2597 | | - | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
2598 | 2604 | | |
2599 | 2605 | | |
2600 | 2606 | | |
| |||
| 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