diff options
author | Chris Mihelich <cmihelic@google.com> | 2024-06-06 08:34:38 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-06-06 08:35:28 -0700 |
commit | ffa1e4a52a35c49e52352674d3099692a3958625 (patch) | |
tree | aed156d9d647ff70ff603fca6b3c95ecee067a16 /absl/debugging/internal/demangle.cc | |
parent | e7a5d7ace011100f6495cb681c1276371f9a693a (diff) |
Demangle new-expressions with braced-init-lists.
PiperOrigin-RevId: 640908672
Change-Id: I85bed6e7d79b24b693007c08acde8e28e3e1429c
Diffstat (limited to 'absl/debugging/internal/demangle.cc')
-rw-r--r-- | absl/debugging/internal/demangle.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/absl/debugging/internal/demangle.cc b/absl/debugging/internal/demangle.cc index efaaf68d..72cc887b 100644 --- a/absl/debugging/internal/demangle.cc +++ b/absl/debugging/internal/demangle.cc @@ -2291,6 +2291,11 @@ static bool ParseExpression(State *state) { } // <initializer> ::= pi <expression>* E +// ::= il <braced-expression>* E +// +// The il ... E form is not in the ABI spec but is seen in practice for +// braced-init-lists in new-expressions, which are standard syntax from C++11 +// on. static bool ParseInitializer(State *state) { ComplexityGuard guard(state); if (guard.IsTooComplex()) return false; @@ -2301,6 +2306,13 @@ static bool ParseInitializer(State *state) { return true; } state->parse_state = copy; + + if (ParseTwoCharToken(state, "il") && + ZeroOrMore(ParseBracedExpression, state) && + ParseOneCharToken(state, 'E')) { + return true; + } + state->parse_state = copy; return false; } |