Commit eaee8aa
authored
[Clang][Sema] fix a bug on template partial specialization (#89862)
attempt to fix
#68885 (comment)
Deduction of NTTP whose type is `decltype(auto)` would create an
implicit cast expression to dependent type and makes the type of primary
template definition (`InjectedClassNameSpecialization`) and its partial
specialization different. Prevent emitting cast expression to make clang
knows their types are identical by removing `CTAK == CTAK_Deduced` when
the type is `decltype(auto)`.
Co-authored-by: huqizhi <[email protected]>1 parent 29dda26 commit eaee8aa
File tree
3 files changed
+15
-1
lines changed- clang
- docs
- lib/Sema
- test/SemaCXX
3 files changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| 614 | + | |
614 | 615 | | |
615 | 616 | | |
616 | 617 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7706 | 7706 | | |
7707 | 7707 | | |
7708 | 7708 | | |
7709 | | - | |
| 7709 | + | |
7710 | 7710 | | |
7711 | 7711 | | |
7712 | 7712 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments