diff --git a/demangle/DemangleTest.cpp b/demangle/DemangleTest.cpp index 5e17362d9..f56a9be3c 100644 --- a/demangle/DemangleTest.cpp +++ b/demangle/DemangleTest.cpp @@ -196,6 +196,14 @@ TEST(DemangleTest, FunctionStartsWithNumber) { ASSERT_EQ("value(one, signed char)", demangler.Parse("_Z5value3onea")); } +TEST(DemangleTest, FunctionStartsWithLPlusNumber) { + Demangler demangler; + + ASSERT_EQ("value(char, int)", demangler.Parse("_ZL5valueci")); + ASSERT_EQ("abcdefjklmn(signed char)", demangler.Parse("_ZL11abcdefjklmna")); + ASSERT_EQ("value(one, signed char)", demangler.Parse("_ZL5value3onea")); +} + TEST(DemangleTest, StdTypes) { Demangler demangler; diff --git a/demangle/Demangler.cpp b/demangle/Demangler.cpp index 1b7406dd3..c0a96aae5 100644 --- a/demangle/Demangler.cpp +++ b/demangle/Demangler.cpp @@ -698,6 +698,8 @@ const char* Demangler::FindFunctionName(const char* name) { if (std::isdigit(*name)) { name = GetStringFromLength(name, &function_name_); + } else if (*name == 'L' && std::isdigit(name[1])) { + name = GetStringFromLength(name + 1, &function_name_); } else { name = AppendOperatorString(name); function_name_ = cur_state_.str;