mirror of git://gcc.gnu.org/git/gcc.git
cp-demangle.c (d_demangle): Only return success if we consumed the entire demangled string.
* cp-demangle.c (d_demangle): Only return success if we consumed the entire demangled string. (is_ctor_or_dtor): Likewise. From-SVN: r74129
This commit is contained in:
parent
be571b7758
commit
f26deb3d44
|
|
@ -1,3 +1,13 @@
|
||||||
|
2003-11-29 Ian Lance Taylor <ian@wasabisystems.com>
|
||||||
|
|
||||||
|
* cp-demangle.c (d_demangle): Only return success if we consumed
|
||||||
|
the entire demangled string.
|
||||||
|
(is_ctor_or_dtor): Likewise.
|
||||||
|
|
||||||
|
* testsuite/demangle-expected: Revert one part of 2003-06-26 patch
|
||||||
|
to restore expected result of EDG test case to original expected
|
||||||
|
result.
|
||||||
|
|
||||||
2003-11-26 Ian Lance Taylor <ian@wasabisystems.com>
|
2003-11-26 Ian Lance Taylor <ian@wasabisystems.com>
|
||||||
|
|
||||||
* cp-demangle.c (struct d_print_mod): Add templates field.
|
* cp-demangle.c (struct d_print_mod): Add templates field.
|
||||||
|
|
|
||||||
|
|
@ -3324,7 +3324,7 @@ d_print_cast (dpi, dc)
|
||||||
/* It appears that for a templated cast operator, we need to put
|
/* It appears that for a templated cast operator, we need to put
|
||||||
the template parameters in scope for the operator name, but
|
the template parameters in scope for the operator name, but
|
||||||
not for the parameters. The effect is that we need to handle
|
not for the parameters. The effect is that we need to handle
|
||||||
the template printing here. FIXME: Verify this. */
|
the template printing here. */
|
||||||
|
|
||||||
hold_dpm = dpi->modifiers;
|
hold_dpm = dpi->modifiers;
|
||||||
dpi->modifiers = NULL;
|
dpi->modifiers = NULL;
|
||||||
|
|
@ -3456,6 +3456,11 @@ d_demangle (mangled, options, palc)
|
||||||
else
|
else
|
||||||
dc = d_type (&di);
|
dc = d_type (&di);
|
||||||
|
|
||||||
|
/* If we didn't consume the entire mangled string, then we didn't
|
||||||
|
successfully demangle it. */
|
||||||
|
if (d_peek_char (&di) != '\0')
|
||||||
|
dc = NULL;
|
||||||
|
|
||||||
#ifdef CP_DEMANGLE_DEBUG
|
#ifdef CP_DEMANGLE_DEBUG
|
||||||
if (dc == NULL)
|
if (dc == NULL)
|
||||||
printf ("failed demangling\n");
|
printf ("failed demangling\n");
|
||||||
|
|
@ -3657,7 +3662,7 @@ is_ctor_or_dtor (mangled, ctor_kind, dtor_kind)
|
||||||
|
|
||||||
dc = d_mangled_name (&di, 1);
|
dc = d_mangled_name (&di, 1);
|
||||||
|
|
||||||
if (dc == NULL)
|
if (dc == NULL || d_peek_char (&di) != '\0')
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
while (dc != NULL)
|
while (dc != NULL)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue