Commit 2612316
authored
[ItaniumDemangle] Add template name to the substitutions list during demangling (llvm#108538)
When demangling a template template parameter (`method<bool,
Bar>(Bar<bool> b)`), the current demangler version first enters the
template argument (`bool`) into the substitutions list, then the whole
template specialization (`Bar<bool>`). The template name (`Bar`) never
becomes a substitution candidate on its own.
This is different when mangling. Mangling `method<bool, Bar>(Bar<bool>
b, Bar<int> i)` substitutes the `Bar` in the second parameter with the
substitution for `TemplateTemplateParmDecl`.
This leads to a discrepancy between mangler and demangler, see
llvm#108009.1 parent 3e0a76b commit 2612316
File tree
3 files changed
+5
-0
lines changed- libcxxabi
- src/demangle
- test
- llvm/include/llvm/Demangle
3 files changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4450 | 4450 | | |
4451 | 4451 | | |
4452 | 4452 | | |
| 4453 | + | |
4453 | 4454 | | |
4454 | 4455 | | |
4455 | 4456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30024 | 30024 | | |
30025 | 30025 | | |
30026 | 30026 | | |
| 30027 | + | |
| 30028 | + | |
| 30029 | + | |
30027 | 30030 | | |
30028 | 30031 | | |
30029 | 30032 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4450 | 4450 | | |
4451 | 4451 | | |
4452 | 4452 | | |
| 4453 | + | |
4453 | 4454 | | |
4454 | 4455 | | |
4455 | 4456 | | |
| |||
0 commit comments