HomePhabricator

Implement demangling support for C++20 lambda expression extensions.

Description

Implement demangling support for C++20 lambda expression extensions.

This implements demangling support for the mangling extensions specified
in https://github.com/itanium-cxx-abi/cxx-abi/pull/85, much of which is
implemented in Clang r359967 and r371004.

Specifically, this provides demangling for:

  • <template-param-decl> in <lambda-sig>
  • <template-param> with non-zero level
  • lambda-expression literals (not emitted by Clang yet)
  • nullptr literals
  • string literals

(The final two seem unrelated, but handling them was necessary in order
to disambiguate between lambda expressions and the other forms of
literal for which we have a type but no value.)

When demangling a <lambda-sig>, we form template parameters with no
corresponding argument, so we cannot substitute in the argument in the
demangling. Instead we invent synthetic names for the template
parameters (eg, '[]<typename $T>($T *x)').

Details

Committed
rsmithSep 6 2019, 4:53 PM
Parents
rL371272: Request commit access for smeenai
Branches
Unknown
Tags
Unknown