Viktoriia Bakalova 2612316f72
[ItaniumDemangle] Add template name to the substitutions list during demangling (#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
https://github.com/llvm/llvm-project/issues/108009.
2024-09-23 11:49:41 +02:00
..