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
libiberty/ChangeLog:
2016-01-27 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_type): Handle function types only in the context
of seeing a pointer type symbol.
* testsuite/d-demangle-expected: Update function pointer tests.
From-SVN: r232862
libiberty/ChangeLog:
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_symbol_kinds): New enum.
(dlang_parse_symbol): Update signature. Handle an ambiguity between
pascal functions and template value arguments. Only check for a type
if parsing a function, or at the top level. Return failure if the
entire symbol was not successfully demangled.
(dlang_identifier): Update signature. Handle an ambiguity between two
adjacent digits in a mangled symbol string.
(dlang_type): Update call to dlang_parse_symbol.
(dlang_template_args): Likewise.
(dlang_parse_template): Likewise.
(dlang_demangle): Likewise.
* testsuite/d-demangle-expected: Fix bad tests found, and add problematic
examples to the unittests.
From-SVN: r223247
libiberty/ChangeLog:
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_attributes): Handle return attributes, ignoring
return parameters in the mangled string. Return NULL if have encountered
an unknown attribute.
(dlang_function_args): Handle return parameters in the mangled string.
* testsuite/d-demangle-expected: Add coverage tests for functions with
return parameters and return attributes.
From-SVN: r223244
libiberty/ChangeLog:
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_type_modifiers): New function.
(dlang_type_modifier_p): New function.
(dlang_call_convention_p): Ignore any kind of type modifier.
(dlang_type): Handle and emit the type modifier after delegate types.
(dlang_parse_symbol): Handle and emit the type modifier after the symbol.
* testsuite/d-demangle-expected: Add coverage tests for all valid
usages of function symbols with type modifiers.
From-SVN: r223242
libiberty/ChangeLog:
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_call_convention): Return NULL if have reached the
end of the symbol, but expected something to read.
(dlang_attributes): Likewise.
(dlang_function_type): Likewise.
(dlang_type): Likewise.
(dlang_identifier): Likewise.
(dlang_value): Likewise.
From-SVN: r223241
libiberty/ChangeLog:
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_parse_string): Represent embedded whitespace or
non-printable characters as hex or escape sequences.
* testsuite/d-demangle-expected: Add test for templates with tabs and
newlines embedded into the signature.
From-SVN: r223240
strtold is currently used to decode templates which have a floating-point
value encoded inside; but this routine is not available on some systems,
such as Solaris 2.9 for instance.
This patch fixes the issue by replace the use of strtold by strtod.
It reduces a bit the precision, but it should still remain acceptable
in most cases.
libiberty/ChangeLog:
* d-demangle.c: Replace strtold with strtod in global comment.
(strtold): Remove declaration.
(strtod): New declaration.
(dlang_parse_real): Declare value as double instead of long
double. Replace call to strtold by call to strtod.
Update format in call to snprintf.
From-SVN: r216216