msvcrt: Fixed space in type with double indirection.
Spotted by James Hawkins.
This commit is contained in:
parent
2e1775620a
commit
f55da6db84
|
@ -984,7 +984,7 @@ static void test_demangle(void)
|
||||||
{"?$AAA@$DBAB@", "AAA<`template-parameter257'>"},
|
{"?$AAA@$DBAB@", "AAA<`template-parameter257'>"},
|
||||||
{"?$AAA@?C@", "AAA<`template-parameter-2'>"},
|
{"?$AAA@?C@", "AAA<`template-parameter-2'>"},
|
||||||
{"?$AAA@PAUBBB@@", "AAA<struct BBB *>"},
|
{"?$AAA@PAUBBB@@", "AAA<struct BBB *>"},
|
||||||
{"??$ccccc@PAVaaa@@@bar@bb@foo@@DGPAV0@PAV0@PAVee@@IPAPAVaaa@@1@Z", "private: static class bar * __stdcall foo::bb::bar::ccccc<class aaa *>(class bar *,class ee *,unsigned int,class aaa **,class ee *)"},
|
{"??$ccccc@PAVaaa@@@bar@bb@foo@@DGPAV0@PAV0@PAVee@@IPAPAVaaa@@1@Z", "private: static class bar * __stdcall foo::bb::bar::ccccc<class aaa *>(class bar *,class ee *,unsigned int,class aaa * *,class ee *)"},
|
||||||
{"?f@T@@QAEHQCY1BE@BO@D@Z", "public: int __thiscall T::f(char (volatile * const)[20][30])"},
|
{"?f@T@@QAEHQCY1BE@BO@D@Z", "public: int __thiscall T::f(char (volatile * const)[20][30])"},
|
||||||
{"?f@T@@QAEHQAY2BE@BO@CI@D@Z", "public: int __thiscall T::f(char (* const)[20][30][40])"},
|
{"?f@T@@QAEHQAY2BE@BO@CI@D@Z", "public: int __thiscall T::f(char (* const)[20][30][40])"},
|
||||||
{"?f@T@@QAEHQAY1BE@BO@$$CBD@Z", "public: int __thiscall T::f(char const (* const)[20][30])"},
|
{"?f@T@@QAEHQAY1BE@BO@$$CBD@Z", "public: int __thiscall T::f(char const (* const)[20][30])"},
|
||||||
|
|
|
@ -410,7 +410,7 @@ static BOOL get_modifier(char ch, const char** ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL get_modified_type(struct datatype_t *ct, struct parsed_symbol* sym,
|
static BOOL get_modified_type(struct datatype_t *ct, struct parsed_symbol* sym,
|
||||||
struct array *pmt_ref, char modif)
|
struct array *pmt_ref, char modif, BOOL in_args)
|
||||||
{
|
{
|
||||||
const char* modifier;
|
const char* modifier;
|
||||||
const char* str_modif;
|
const char* str_modif;
|
||||||
|
@ -465,7 +465,7 @@ static BOOL get_modified_type(struct datatype_t *ct, struct parsed_symbol* sym,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* don't insert a space between duplicate '*' */
|
/* don't insert a space between duplicate '*' */
|
||||||
if (str_modif[0] && str_modif[1] == '*' && sub_ct.left[strlen(sub_ct.left)-1] == '*')
|
if (!in_args && str_modif[0] && str_modif[1] == '*' && sub_ct.left[strlen(sub_ct.left)-1] == '*')
|
||||||
str_modif++;
|
str_modif++;
|
||||||
ct->left = str_printf(sym, "%s%s", sub_ct.left, str_modif );
|
ct->left = str_printf(sym, "%s%s", sub_ct.left, str_modif );
|
||||||
}
|
}
|
||||||
|
@ -793,17 +793,17 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!get_modified_type(ct, sym, pmt_ref, '?')) goto done;
|
if (!get_modified_type(ct, sym, pmt_ref, '?', in_args)) goto done;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'A': /* reference */
|
case 'A': /* reference */
|
||||||
case 'B': /* volatile reference */
|
case 'B': /* volatile reference */
|
||||||
if (!get_modified_type(ct, sym, pmt_ref, dt)) goto done;
|
if (!get_modified_type(ct, sym, pmt_ref, dt, in_args)) goto done;
|
||||||
break;
|
break;
|
||||||
case 'Q': /* const pointer */
|
case 'Q': /* const pointer */
|
||||||
case 'R': /* volatile pointer */
|
case 'R': /* volatile pointer */
|
||||||
case 'S': /* const volatile pointer */
|
case 'S': /* const volatile pointer */
|
||||||
if (!get_modified_type(ct, sym, pmt_ref, in_args ? dt : 'P')) goto done;
|
if (!get_modified_type(ct, sym, pmt_ref, in_args ? dt : 'P', in_args)) goto done;
|
||||||
break;
|
break;
|
||||||
case 'P': /* Pointer */
|
case 'P': /* Pointer */
|
||||||
if (isdigit(*sym->current))
|
if (isdigit(*sym->current))
|
||||||
|
@ -833,7 +833,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
|
||||||
}
|
}
|
||||||
else goto done;
|
else goto done;
|
||||||
}
|
}
|
||||||
else if (!get_modified_type(ct, sym, pmt_ref, 'P')) goto done;
|
else if (!get_modified_type(ct, sym, pmt_ref, 'P', in_args)) goto done;
|
||||||
break;
|
break;
|
||||||
case 'W':
|
case 'W':
|
||||||
if (*sym->current == '4')
|
if (*sym->current == '4')
|
||||||
|
|
Loading…
Reference in New Issue