diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-04 19:48:44 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-04 19:48:44 +0000 |
commit | 3c87c5c3802576ca5129f9f3c04d4eef54d42af6 (patch) | |
tree | aaac86f4eea92ded40e8b835a6329a27c511f128 /libiberty/testsuite | |
parent | b87cc05b351ece3650993daa6d5ce0c80f5ee645 (diff) | |
download | gcc-3c87c5c3802576ca5129f9f3c04d4eef54d42af6.tar.gz |
* cp-demangle.c (IS_UPPER, IS_LOWER): Define.
(d_last_char): Define new macro.
(d_make_name): Reject an empty name.
(d_prefix, d_unqualified_name, d_type): Use new IS_* macros.
(d_substitution, d_print_identifier): Likewise.
(d_print_comp) [D_COMP_OPERATOR]: Likewise.
(d_print_comp) [D_COMP_TEMPLATE]: Use new d_last_char macro.
(d_print_mod) Use new d_last_char macro.
(d_print_cast): Use new d_last_char macro.
(is_ctor_or_dtor): Don't leak memory.
Fix handling of member function modifiers:
* cp-demangle.c (enum d_comp_type): Add D_COMP_RESTRICT_THIS,
D_COMP_VOLATILE_THIS, and D_COMP_CONST_THIS.
(d_dump): Dump new d_comp_type values.
(d_make_comp): Accept new d_comp_type values.
(has_return_type): Only accept _THIS variants of qualifiers.
(d_encoding): Without DMGL_PARAMS, only remove _THIS variants of
qualifiers.
(d_cv_qualifiers): Add member_fn parameter. Change all callers.
(d_print_comp) [D_COMP_TYPED_NAME]: Rather than removing
qualifiers and printing them at the end, add _THIS qualifiers to
the modifier list.
(d_print_comp) [D_COMP_*_THIS]: New cases.
(d_print_comp) [D_COMP_PTRMEM_TYPE]: Remove special handling of
qualifiers.
(d_print_mod_list): Add suffix parameter. Change all callers.
Keep walking the list even if the current modifier has been
printed.
(d_print_mod): Handle new _THIS qualifiers.
(d_print_function_type): Handle new _THIS qualifiers when deciding
whether to print a parenthesis. Put a space before the
parenthesis in some cases. Call d_print_mod_list again at the
end, passing suffix as 1.
(is_ctor_or_dtor): Look for new _THIS qualifiers.
* testsuite/demangle-expected: Add test case.
Fix for PR gcc/13304:
* cp-demangle.c (d_print_comp) [D_COMP_TEMPLATE]: If the character
before the '<' is itself a '<', insert a space.
(d_print_cast): Likewise.
* testsuite/demangle-expected: Add test case.
Fix for PR gcc/13244:
* cp-demangle.c (d_print_comp) [D_COMP_BINARY]: Wrap an expression
which uses the '>' operator in an extra layer of parens.
* testsuite/demangle-expected: Add test case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74290 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/testsuite')
-rw-r--r-- | libiberty/testsuite/demangle-expected | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index bb90aa01ae3..c47c6aea5fa 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -2883,10 +2883,28 @@ void __gnu_debug::_Error_formatter::_M_format_word<unsigned long>(char*, int, ch --format=gnu-v3 _ZSt18uninitialized_copyIN9__gnu_cxx17__normal_iteratorIPSt4pairISsPFbP6sqlitePPcEESt6vectorIS9_SaIS9_EEEESE_ET0_T_SG_SF_ __gnu_cxx::__normal_iterator<std::pair<std::string, bool (*)(sqlite*, char**)>*, std::vector<std::pair<std::string, bool (*)(sqlite*, char**)>, std::allocator<std::pair<std::string, bool (*)(sqlite*, char**)> > > > std::uninitialized_copy<__gnu_cxx::__normal_iterator<std::pair<std::string, bool (*)(sqlite*, char**)>*, std::vector<std::pair<std::string, bool (*)(sqlite*, char**)>, std::allocator<std::pair<std::string, bool (*)(sqlite*, char**)> > > >, __gnu_cxx::__normal_iterator<std::pair<std::string, bool (*)(sqlite*, char**)>*, std::vector<std::pair<std::string, bool (*)(sqlite*, char**)>, std::allocator<std::pair<std::string, bool (*)(sqlite*, char**)> > > > >(__gnu_cxx::__normal_iterator<std::pair<std::string, bool (*)(sqlite*, char**)>*, std::vector<std::pair<std::string, bool (*)(sqlite*, char**)>, std::allocator<std::pair<std::string, bool (*)(sqlite*, char**)> > > >, __gnu_cxx::__normal_iterator<std::pair<std::string, bool (*)(sqlite*, char**)>*, std::vector<std::pair<std::string, bool (*)(sqlite*, char**)>, std::allocator<std::pair<std::string, bool (*)(sqlite*, char**)> > > >, __gnu_cxx::__normal_iterator<std::pair<std::string, bool (*)(sqlite*, char**)>*, std::vector<std::pair<std::string, bool (*)(sqlite*, char**)>, std::allocator<std::pair<std::string, bool (*)(sqlite*, char**)> > > >) +# # The new demangler used to fail on this. --format=gnu-v3 _Z1fP1cIPFiiEE f(c<int (*)(int)>*) +# +# Wrap expressions using '>' in an extra layer of parens to avoid +# confusion with the '>' which ends the template parameters. +--format=gnu-v3 +_Z4dep9ILi3EEvP3fooIXgtT_Li2EEE +void dep9<3>(foo<((3) > (2))>*) +# +# Watch out for templated version of `operator<'--it needs an extra +# space. +--format=gnu-v3 +_ZStltI9file_pathSsEbRKSt4pairIT_T0_ES6_ +bool std::operator< <file_path, std::string>(std::pair<file_path, std::string> const&, std::pair<file_path, std::string> const&) +# +# More hairy qualifier handling. +--format=gnu-v3 +_Z9hairyfuncM1YKFPVPFrPA2_PM1XKFKPA3_ilEPcEiE +hairyfunc(int (* const (X::** (* restrict (* volatile*(Y::*)(int) const)(char*)) [2])(long) const) [3]) # # This caused an infinite loop. # |