Commit eb00182
authored
[Clang] prevent errors for deduction guides using deduced type aliases (#117450)
Fixes #54909
---
Clang incorrectly produces diagnostics for alias templates in deduction
guides, treating them as separate from their underlying types. This
issue arises because Clang doesn't properly handle
`TypeAliasTemplateDecl` when comparing template names for equality in
the context of deduction guides, resulting in diagnostics that don't
align with the C++ standard. As the C++ standard specifies - _an alias
template is considered a synonym for its underlying type_
With this change, Clang now correctly resolves alias templates to their
underlying types in deduction guides, ensuring compliance with the C++
standard.1 parent 427be07 commit eb00182
File tree
3 files changed
+35
-18
lines changed- clang
- docs
- lib/Sema
- test/CXX/temp/temp.deduct.guide
3 files changed
+35
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
593 | 596 | | |
594 | 597 | | |
595 | 598 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11451 | 11451 | | |
11452 | 11452 | | |
11453 | 11453 | | |
11454 | | - | |
11455 | | - | |
11456 | | - | |
11457 | | - | |
11458 | | - | |
11459 | | - | |
11460 | | - | |
11461 | | - | |
11462 | | - | |
11463 | | - | |
11464 | | - | |
11465 | | - | |
11466 | | - | |
11467 | | - | |
11468 | | - | |
11469 | | - | |
11470 | | - | |
| 11454 | + | |
| 11455 | + | |
| 11456 | + | |
| 11457 | + | |
| 11458 | + | |
| 11459 | + | |
| 11460 | + | |
| 11461 | + | |
| 11462 | + | |
| 11463 | + | |
| 11464 | + | |
| 11465 | + | |
| 11466 | + | |
| 11467 | + | |
| 11468 | + | |
| 11469 | + | |
| 11470 | + | |
| 11471 | + | |
| 11472 | + | |
| 11473 | + | |
| 11474 | + | |
| 11475 | + | |
| 11476 | + | |
11471 | 11477 | | |
11472 | 11478 | | |
11473 | 11479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
0 commit comments