re PR c++/48665 (type of const member function)
PR c++/48665 * cp-demangle.c (d_cv_qualifiers): If qualifiers are applied to a function type, change them to apply to the "this" parameter. * testsuite/demangle-expected: Add test case. From-SVN: r179772
This commit is contained in:
parent
06fe026c0c
commit
d58818f7ba
@ -1,3 +1,10 @@
|
|||||||
|
2011-10-10 Ian Lance Taylor <iant@google.com>
|
||||||
|
|
||||||
|
PR c++/48665
|
||||||
|
* cp-demangle.c (d_cv_qualifiers): If qualifiers are applied to a
|
||||||
|
function type, change them to apply to the "this" parameter.
|
||||||
|
* testsuite/demangle-expected: Add test case.
|
||||||
|
|
||||||
2011-09-28 Doug Evans <dje@google.com>
|
2011-09-28 Doug Evans <dje@google.com>
|
||||||
|
|
||||||
* timeval-utils.c: New file.
|
* timeval-utils.c: New file.
|
||||||
|
@ -2294,8 +2294,10 @@ static struct demangle_component **
|
|||||||
d_cv_qualifiers (struct d_info *di,
|
d_cv_qualifiers (struct d_info *di,
|
||||||
struct demangle_component **pret, int member_fn)
|
struct demangle_component **pret, int member_fn)
|
||||||
{
|
{
|
||||||
|
struct demangle_component **pstart;
|
||||||
char peek;
|
char peek;
|
||||||
|
|
||||||
|
pstart = pret;
|
||||||
peek = d_peek_char (di);
|
peek = d_peek_char (di);
|
||||||
while (peek == 'r' || peek == 'V' || peek == 'K')
|
while (peek == 'r' || peek == 'V' || peek == 'K')
|
||||||
{
|
{
|
||||||
@ -2332,6 +2334,28 @@ d_cv_qualifiers (struct d_info *di,
|
|||||||
peek = d_peek_char (di);
|
peek = d_peek_char (di);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!member_fn && peek == 'F')
|
||||||
|
{
|
||||||
|
while (pstart != pret)
|
||||||
|
{
|
||||||
|
switch ((*pstart)->type)
|
||||||
|
{
|
||||||
|
case DEMANGLE_COMPONENT_RESTRICT:
|
||||||
|
(*pstart)->type = DEMANGLE_COMPONENT_RESTRICT_THIS;
|
||||||
|
break;
|
||||||
|
case DEMANGLE_COMPONENT_VOLATILE:
|
||||||
|
(*pstart)->type = DEMANGLE_COMPONENT_VOLATILE_THIS;
|
||||||
|
break;
|
||||||
|
case DEMANGLE_COMPONENT_CONST:
|
||||||
|
(*pstart)->type = DEMANGLE_COMPONENT_CONST_THIS;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
pstart = &d_left (*pstart);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return pret;
|
return pret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4198,3 +4198,8 @@ f1<int>
|
|||||||
_Z3fooi._omp_cpyfn.6
|
_Z3fooi._omp_cpyfn.6
|
||||||
foo(int) [clone ._omp_cpyfn.6]
|
foo(int) [clone ._omp_cpyfn.6]
|
||||||
foo
|
foo
|
||||||
|
#
|
||||||
|
--format=gnu-v3 --no-params
|
||||||
|
_Z1fIKFvvES0_Evv
|
||||||
|
void f<void () const, void ()>()
|
||||||
|
f<void () const, void ()>
|
||||||
|
Loading…
Reference in New Issue
Block a user