d-demangle.c (dlang_value): Add comment explaining why cases for digits are required.

libiberty/ChangeLog:

	* d-demangle.c (dlang_value): Add comment explaining why cases for
	digits are required.
	* testsuite/d-demangle-expected: Update integer value tests.

From-SVN: r247436
This commit is contained in:
Iain Buclaw 2017-05-01 11:01:02 +00:00 committed by Iain Buclaw
parent 98bb7ee2da
commit dd03444ba5
3 changed files with 27 additions and 17 deletions

View File

@ -1,3 +1,9 @@
2017-05-01 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_value): Add comment explaining why cases for
digits are required.
* testsuite/d-demangle-expected: Update integer value tests.
2017-05-01 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_parse_symbol): Skip over anonymous symbols.

View File

@ -1243,6 +1243,10 @@ dlang_value (string *decl, const char *mangled, const char *name, char type)
if (*mangled < '0' || *mangled > '9')
return NULL;
/* Fall through */
/* There really should always be an `i' before encoded numbers, but there
wasn't in early versions of D2, so this case range must remain for
backwards compatibility. */
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
mangled = dlang_parse_integer (decl, mangled, type);

View File

@ -698,35 +698,35 @@ _D8demangle13__T4testVPinZv
demangle.test!(null)
#
--format=dlang
_D8demangle14__T4testVg123Zv
_D8demangle15__T4testVgi123Zv
demangle.test!(123)
#
--format=dlang
_D8demangle14__T4testVi123Zv
_D8demangle15__T4testVii123Zv
demangle.test!(123)
#
--format=dlang
_D8demangle14__T4testVs123Zv
_D8demangle15__T4testVsi123Zv
demangle.test!(123)
#
--format=dlang
_D8demangle14__T4testVh123Zv
_D8demangle15__T4testVhi123Zv
demangle.test!(123u)
#
--format=dlang
_D8demangle14__T4testVk123Zv
_D8demangle15__T4testVki123Zv
demangle.test!(123u)
#
--format=dlang
_D8demangle14__T4testVt123Zv
_D8demangle15__T4testVti123Zv
demangle.test!(123u)
#
--format=dlang
_D8demangle14__T4testVl123Zv
_D8demangle15__T4testVli123Zv
demangle.test!(123L)
#
--format=dlang
_D8demangle14__T4testVm123Zv
_D8demangle15__T4testVmi123Zv
demangle.test!(123uL)
#
--format=dlang
@ -746,35 +746,35 @@ _D8demangle15__T4testVmN123Zv
demangle.test!(-123uL)
#
--format=dlang
_D8demangle12__T4testVb1Zv
_D8demangle13__T4testVbi1Zv
demangle.test!(true)
#
--format=dlang
_D8demangle12__T4testVb0Zv
_D8demangle13__T4testVbi0Zv
demangle.test!(false)
#
--format=dlang
_D8demangle13__T4testVa10Zv
_D8demangle14__T4testVai10Zv
demangle.test!('\x0a')
#
--format=dlang
_D8demangle13__T4testVa32Zv
_D8demangle14__T4testVai32Zv
demangle.test!(' ')
#
--format=dlang
_D8demangle13__T4testVa65Zv
_D8demangle14__T4testVai65Zv
demangle.test!('A')
#
--format=dlang
_D8demangle14__T4testVa126Zv
_D8demangle15__T4testVai126Zv
demangle.test!('~')
#
--format=dlang
_D8demangle15__T4testVu1000Zv
_D8demangle16__T4testVui1000Zv
demangle.test!('\u03e8')
#
--format=dlang
_D8demangle17__T4testVw100000Zv
_D8demangle18__T4testVwi100000Zv
demangle.test!('\U000186a0')
#
--format=dlang
@ -1076,7 +1076,7 @@ _D8demangle20__T2fnVAiA4i1i2i3i4Z2fnFZv
demangle.fn!([1, 2, 3, 4]).fn()
#
--format=dlang
_D8demangle10__T2fnVi1Z2fnFZv
_D8demangle11__T2fnVii1Z2fnFZv
demangle.fn!(1).fn()
#
--format=dlang