r207971 - in /branches/google/gcc-4_8/libiberty...
ccoutant@gcc.gnu.org
ccoutant@gcc.gnu.org
Thu Feb 20 22:50:00 GMT 2014
Author: ccoutant
Date: Thu Feb 20 22:50:29 2014
New Revision: 207971
URL: http://gcc.gnu.org/viewcvs?rev=207971&root=gcc&view=rev
Log:
Fix demangler to handle conversion operators correctly.
Backported from trunk r205292.
2013-11-22 Cary Coutant <ccoutant@google.com>
libiberty/
* cp-demangle.c (struct d_info_checkpoint): New struct.
(struct d_print_info): Add current_template field.
(d_operator_name): Set flag when processing a conversion
operator.
(cplus_demangle_type): When processing <template-args> for
a conversion operator, backtrack if necessary.
(d_expression_1): Renamed from d_expression.
(d_expression): New wrapper around d_expression_1.
(d_checkpoint): New function.
(d_backtrack): New function.
(d_print_init): Initialize current_template.
(d_print_comp): Set current_template.
(d_print_cast): Put current_template in scope for
printing conversion operator name.
(cplus_demangle_init_info): Initialize is_expression and
is_conversion.
* cp-demangle.h (struct d_info): Add is_expression and
is_conversion fields.
* testsuite/demangle-expected: New test cases.
Modified:
branches/google/gcc-4_8/libiberty/cp-demangle.c
branches/google/gcc-4_8/libiberty/cp-demangle.h
branches/google/gcc-4_8/libiberty/testsuite/demangle-expected
More information about the Gcc-cvs
mailing list