mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 00:26:42 +00:00

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.