Commit 00dad7d
committed
[clang] Fix missing promotion type for opaque enum declarations in class templates
Repeat the steps in `Sema::ActOnTag` for the promotion type after type substitution of the
underlying type. This is required in the case of an *opaque-enum-declaration* (see [dcl.enum]).
If, instead, a full *enum-specifier* (subsequent curly braces) is provided, `Sema::ActOnEnumBody`
is re-invoked on template instantiation overriding the promotion type and hiding the issue.
Note that, in contrast to `Sema::ActOnEnumBody`, `Sema::ActOnTag` is *not* called again for the
instantiated enumeration type.
Fixes #117960.1 parent 6192faf commit 00dad7d
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1571 | 1571 | | |
1572 | 1572 | | |
1573 | 1573 | | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
1574 | 1591 | | |
1575 | 1592 | | |
1576 | 1593 | | |
| |||
0 commit comments