diff options
author | Chris Mihelich <cmihelic@google.com> | 2024-05-29 06:42:14 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-05-29 06:43:14 -0700 |
commit | 77d0ac71e41bb35c6415d38f20b5cd8faadec35a (patch) | |
tree | aecac22f34211765457b06b345232b443e68b34c /absl/debugging/internal/demangle.cc | |
parent | abc0f8d1096a66c087365327c217963eab15839c (diff) |
Demangle C++ requires-expressions with parameters (rQ ... E).
PiperOrigin-RevId: 638266358
Change-Id: I8a750a53d5e98bc3ad3b6d36661789d97d6efb0a
Diffstat (limited to 'absl/debugging/internal/demangle.cc')
-rw-r--r-- | absl/debugging/internal/demangle.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/absl/debugging/internal/demangle.cc b/absl/debugging/internal/demangle.cc index 606ff4e7..2e692d38 100644 --- a/absl/debugging/internal/demangle.cc +++ b/absl/debugging/internal/demangle.cc @@ -1922,6 +1922,7 @@ static bool ParseBracedExpression(State *state) { // ::= sr <type> <unqualified-name> // ::= u <source-name> <template-arg>* E # vendor extension // ::= rq <requirement>+ E +// ::= rQ <bare-function-type> _ <requirement>+ E static bool ParseExpression(State *state) { ComplexityGuard guard(state); if (guard.IsTooComplex()) return false; @@ -2093,6 +2094,16 @@ static bool ParseExpression(State *state) { } state->parse_state = copy; + // <expression> ::= rQ <bare-function-type> _ <requirement>+ E + // + // https://github.com/itanium-cxx-abi/cxx-abi/issues/24 + if (ParseTwoCharToken(state, "rQ") && ParseBareFunctionType(state) && + ParseOneCharToken(state, '_') && OneOrMore(ParseRequirement, state) && + ParseOneCharToken(state, 'E')) { + return true; + } + state->parse_state = copy; + return ParseUnresolvedName(state); } |