summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Mihelich <cmihelic@google.com>2024-06-07 10:31:13 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2024-06-07 10:32:10 -0700
commitc586e8d88af54250257419980c3e04fd410e037c (patch)
tree6fb27d1561657db6e04675e10678e353ab6d07c0
parent61e721f41f3e9de4e3a9ef97b32700f84d26ea3b (diff)
Demangle operator co_await (aw).
PiperOrigin-RevId: 641291188 Change-Id: I02f6bae62b05c8964a3b6e8f78299061ce57e01a
-rw-r--r--absl/debugging/internal/demangle.cc2
-rw-r--r--absl/debugging/internal/demangle_test.cc8
2 files changed, 10 insertions, 0 deletions
diff --git a/absl/debugging/internal/demangle.cc b/absl/debugging/internal/demangle.cc
index 46a63964..812efe13 100644
--- a/absl/debugging/internal/demangle.cc
+++ b/absl/debugging/internal/demangle.cc
@@ -52,6 +52,8 @@ static const AbbrevPair kOperatorList[] = {
{"dl", "delete", 1},
{"da", "delete[]", 1},
+ {"aw", "co_await", 1},
+
{"ps", "+", 1}, // "positive"
{"ng", "-", 1}, // "negative"
{"ad", "&", 1}, // "address-of"
diff --git a/absl/debugging/internal/demangle_test.cc b/absl/debugging/internal/demangle_test.cc
index 6f69cff9..3285f2ca 100644
--- a/absl/debugging/internal/demangle_test.cc
+++ b/absl/debugging/internal/demangle_test.cc
@@ -1087,6 +1087,14 @@ TEST(Demangle, Spaceship) {
EXPECT_STREQ("g<>()", tmp);
}
+TEST(Demangle, CoAwait) {
+ char tmp[80];
+
+ // ns::Awaitable::operator co_await() const
+ EXPECT_TRUE(Demangle("_ZNK2ns9AwaitableawEv", tmp, sizeof(tmp)));
+ EXPECT_STREQ("ns::Awaitable::operator co_await()", tmp);
+}
+
TEST(Demangle, VendorExtendedExpressions) {
char tmp[80];