d-demangle.c (dlang_attributes): Handle scope attributes.

libiberty/ChangeLog:

	* d-demangle.c (dlang_attributes): Handle scope attributes.
	* testsuite/d-demangle-expected: Add tests.

From-SVN: r247432
This commit is contained in:
Iain Buclaw 2017-05-01 10:39:52 +00:00 committed by Iain Buclaw
parent 3a324b98c5
commit ec89d258a0
3 changed files with 53 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2017-05-01 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_attributes): Handle scope attributes.
* testsuite/d-demangle-expected: Add tests.
2017-04-27 Jonathan Wakely <jwakely@redhat.com>
PR demangler/80513

View File

@ -327,6 +327,10 @@ dlang_attributes (string *decl, const char *mangled)
mangled++;
string_append (decl, "return ");
continue;
case 'l': /* scope */
mangled++;
string_append (decl, "scope ");
continue;
default: /* unknown attribute */
return NULL;

View File

@ -330,6 +330,10 @@ _D8demangle4testFNkaZv
demangle.test(return char)
#
--format=dlang
_D8demangle4testFNlaZv
demangle.test(char)
#
--format=dlang
_D8demangle4testFaXv
demangle.test(char...)
#
@ -478,6 +482,26 @@ _D8demangle4testFNjNkDFNjZaZv
demangle.test(return char() return delegate)
#
--format=dlang
_D8demangle4testFNlDFZaZv
demangle.test(char() delegate)
#
--format=dlang
_D8demangle4testFMDFZaZv
demangle.test(scope char() delegate)
#
--format=dlang
_D8demangle4testFDFNlZaZv
demangle.test(char() scope delegate)
#
--format=dlang
_D8demangle4testFMDFNlZaZv
demangle.test(scope char() scope delegate)
#
--format=dlang
_D8demangle4testFNlMDFNlZaZv
demangle.test(scope char() scope delegate)
#
--format=dlang
_D8demangle4testFPFNaZaZv
demangle.test(char() pure function)
#
@ -534,6 +558,26 @@ _D8demangle4testFNjNkPFNjZaZv
demangle.test(return char() return function)
#
--format=dlang
_D8demangle4testFNlPFZaZv
demangle.test(char() function)
#
--format=dlang
_D8demangle4testFMPFZaZv
demangle.test(scope char() function)
#
--format=dlang
_D8demangle4testFPFNlZaZv
demangle.test(char() scope function)
#
--format=dlang
_D8demangle4testFMPFNlZaZv
demangle.test(scope char() scope function)
#
--format=dlang
_D8demangle4testFNlMPFNlZaZv
demangle.test(scope char() scope function)
#
--format=dlang
_D8demangle4test6__initZ
demangle.test.init$
#