d-demangle.c (dlang_function_args): Append ',' for variadic functions only if parameters were seen before the...

libiberty/ChangeLog:

2016-01-26  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-demangle.c (dlang_function_args): Append ',' for variadic functions
	only if parameters were seen before the elipsis symbol.
	* testsuite/d-demangle-expected: Add coverage test for parameter-less
	variadic functions.

From-SVN: r232863
This commit is contained in:
Iain Buclaw 2016-01-27 01:07:17 +00:00 committed by Iain Buclaw
parent 0f4b8b316f
commit acf1f7da96
3 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2016-01-27 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_function_args): Append ',' for variadic functions
only if parameters were seen before the elipsis symbol.
* testsuite/d-demangle-expected: Add coverage test for parameter-less
variadic functions.
2016-01-27 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_type): Handle function types only in the context

View File

@ -399,7 +399,9 @@ dlang_function_args (string *decl, const char *mangled)
return mangled;
case 'Y': /* (variadic T t, ...) style. */
mangled++;
string_append (decl, ", ...");
if (n != 0)
string_append (decl, ", ");
string_append (decl, "...");
return mangled;
case 'Z': /* Normal function. */
mangled++;

View File

@ -342,6 +342,10 @@ _D8demangle4testFaaYv
demangle.test(char, char, ...)
#
--format=dlang
_D8demangle4testFYv
demangle.test(...)
#
--format=dlang
_D8demangle4testFaaZv
demangle.test(char, char)
#