Commit e0b6ceea authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

msvcrt: Add support for C++11 operator "" in demangling.

parent d89e7cd4
...@@ -1488,6 +1488,19 @@ static BOOL symbol_demangle(struct parsed_symbol* sym) ...@@ -1488,6 +1488,19 @@ static BOOL symbol_demangle(struct parsed_symbol* sym)
case 'V': function_name = "operator delete[]"; break; case 'V': function_name = "operator delete[]"; break;
case 'X': function_name = "`placement delete closure'"; break; case 'X': function_name = "`placement delete closure'"; break;
case 'Y': function_name = "`placement delete[] closure'"; break; case 'Y': function_name = "`placement delete[] closure'"; break;
case '_':
switch (*++sym->current)
{
case 'K':
sym->current++;
function_name = str_printf(sym, "operator \"\" %s", get_literal_string(sym));
--sym->current;
break;
default:
FIXME("Unknown operator: __%c\n", *sym->current);
return FALSE;
}
break;
default: default:
ERR("Unknown operator: _%c\n", *sym->current); ERR("Unknown operator: _%c\n", *sym->current);
return FALSE; return FALSE;
......
...@@ -192,19 +192,24 @@ static void test___std_type_info(void) ...@@ -192,19 +192,24 @@ static void test___std_type_info(void)
static void test___unDName(void) static void test___unDName(void)
{ {
char *name; static struct {const char *in; const char *out; const char *broken;} und_tests[] =
{
name = p___unDName(0, "??4QDnsDomainNameRecord@@QAEAAV0@$$QAV0@@Z", 0, malloc, free, 0); /* 1 */ {"??4QDnsDomainNameRecord@@QAEAAV0@$$QAV0@@Z",
ok(!strcmp(name, "public: class QDnsDomainNameRecord & __thiscall " "public: class QDnsDomainNameRecord & __thiscall QDnsDomainNameRecord::operator=(class QDnsDomainNameRecord &&)"},
"QDnsDomainNameRecord::operator=(class QDnsDomainNameRecord &&)"), /* 2 */ {"??4QDnsDomainNameRecord@@QAEAAV0@$$QEAV0@@Z",
"unDName returned %s\n", wine_dbgstr_a(name)); "public: class QDnsDomainNameRecord & __thiscall QDnsDomainNameRecord::operator=(class QDnsDomainNameRecord && __ptr64)"},
free(name); /* 3 */ {"??__K_l@@YA?AUCC@@I@Z", "struct CC __cdecl operator \"\" _l(unsigned int)",
"??__K_l@@YA?AUCC@@I@Z" /* W10 1507 fails on this :-( */},
name = p___unDName(0, "??4QDnsDomainNameRecord@@QAEAAV0@$$QEAV0@@Z", 0, malloc, free, 0); };
ok(!strcmp(name, "public: class QDnsDomainNameRecord & __thiscall " unsigned i;
"QDnsDomainNameRecord::operator=(class QDnsDomainNameRecord && __ptr64)"), for (i = 0; i < ARRAY_SIZE(und_tests); i++)
"unDName returned %s\n", wine_dbgstr_a(name)); {
char *name = p___unDName(0, und_tests[i].in, 0, malloc, free, 0);
ok(!strcmp(name, und_tests[i].out) ||
(broken(und_tests[i].broken && !strcmp(und_tests[i].broken, name))),
"unDName returned %s for #%u\n", wine_dbgstr_a(name), i);
free(name); free(name);
}
} }
START_TEST(cpp) START_TEST(cpp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment