diff options
author | Chris Mihelich <cmihelic@google.com> | 2024-06-07 12:27:00 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-06-07 12:28:06 -0700 |
commit | 9140cc7b19ee1eddde576ff18d486b6e7a3f6170 (patch) | |
tree | 841065f305592ae8621a03870c737aaa46ea1c82 /absl/debugging/internal/demangle.cc | |
parent | c6000317f1cef3069315de81f918e1ac556e2ace (diff) |
Demangle complex floating-point literals.
PiperOrigin-RevId: 641324572
Change-Id: Ie266da9c8c702e62b89352d64870fb41d2ea76c3
Diffstat (limited to 'absl/debugging/internal/demangle.cc')
-rw-r--r-- | absl/debugging/internal/demangle.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/absl/debugging/internal/demangle.cc b/absl/debugging/internal/demangle.cc index 6507afb5..184d89fb 100644 --- a/absl/debugging/internal/demangle.cc +++ b/absl/debugging/internal/demangle.cc @@ -2476,8 +2476,15 @@ static bool ParseExprCastValueAndTrailingE(State *state) { } state->parse_state = copy; - if (ParseFloatNumber(state) && ParseOneCharToken(state, 'E')) { - return true; + if (ParseFloatNumber(state)) { + // <float> for ordinary floating-point types + if (ParseOneCharToken(state, 'E')) return true; + + // <float> _ <float> for complex floating-point types + if (ParseOneCharToken(state, '_') && ParseFloatNumber(state) && + ParseOneCharToken(state, 'E')) { + return true; + } } state->parse_state = copy; |