diff options
author | Abseil Team <absl-team@google.com> | 2021-08-17 13:00:49 -0700 |
---|---|---|
committer | Andy Getz <durandal@google.com> | 2021-08-17 16:15:01 -0400 |
commit | c1aa431c071af43d7935bc0d44d560ea851a7696 (patch) | |
tree | 486150b8e67349be872687eee86bae5d05dec531 /absl | |
parent | f9d3bc9e0074c8e01b19bb83303fd8aa02cde5d9 (diff) |
Export of internal Abseil changes
--
aabb5093ff380fc60d9a75ace279b620fdc4bff9 by Abseil Team <absl-team@google.com>:
Demangle Clang-specific "<expression> ::= cp <simple-id> <expression>* E"
Cf. https://clang.llvm.org/doxygen/ItaniumMangle_8cpp_source.html#l04338
PiperOrigin-RevId: 391358031
--
34dc7baa38f74a8c78b91ac94486707347a85e35 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 391282565
GitOrigin-RevId: aabb5093ff380fc60d9a75ace279b620fdc4bff9
Change-Id: I6d3e235a9c0a1b67a43071de205fed0fefe12912
Diffstat (limited to 'absl')
-rw-r--r-- | absl/debugging/internal/demangle.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/absl/debugging/internal/demangle.cc b/absl/debugging/internal/demangle.cc index 5cd56320..93ae3279 100644 --- a/absl/debugging/internal/demangle.cc +++ b/absl/debugging/internal/demangle.cc @@ -1617,6 +1617,7 @@ static bool ParseUnresolvedName(State *state) { // ::= <2-ary operator-name> <expression> <expression> // ::= <3-ary operator-name> <expression> <expression> <expression> // ::= cl <expression>+ E +// ::= cp <simple-id> <expression>* E # Clang-specific. // ::= cv <type> <expression> # type (expression) // ::= cv <type> _ <expression>* E # type (expr-list) // ::= st <type> @@ -1639,14 +1640,23 @@ static bool ParseExpression(State *state) { return true; } - // Object/function call expression. ParseState copy = state->parse_state; + + // Object/function call expression. if (ParseTwoCharToken(state, "cl") && OneOrMore(ParseExpression, state) && ParseOneCharToken(state, 'E')) { return true; } state->parse_state = copy; + // Clang-specific "cp <simple-id> <expression>* E" + // https://clang.llvm.org/doxygen/ItaniumMangle_8cpp_source.html#l04338 + if (ParseTwoCharToken(state, "cp") && ParseSimpleId(state) && + ZeroOrMore(ParseExpression, state) && ParseOneCharToken(state, 'E')) { + return true; + } + state->parse_state = copy; + // Function-param expression (level 0). if (ParseTwoCharToken(state, "fp") && Optional(ParseCVQualifiers(state)) && Optional(ParseNumber(state, nullptr)) && ParseOneCharToken(state, '_')) { |