[RFA] Change functions in cp-name-parser.y into methods
Pedro Alves
palves@redhat.com
Sat Jun 2 09:57:00 GMT 2018
On 06/01/2018 06:51 PM, Tom Tromey wrote:
> Pedro pointed out in an earlier patch that it would be possible to
> make some helper functions in cp-name-parser.y into methods on
> cpname_state, cleaning up the code a bit. This patch implements this
> idea.
>
> Doing this required moving the %union earlier in the .y file, so the
> patch is somewhat bigger than you might expect.
>
> Tested by building with both bison and byacc, and then running the
> gdb.cp tests.
>
> ChangeLog
> 2018-06-01 Tom Tromey <tom@tromey.com>
>
> * cp-name-parser.y (cpname_state): Add method declarations.
> (HANDLE_QUAL): Update.
> (cpname_state::d_grab, cpname_state::fill_comp)
> (cpname_state::make_operator, cpname_state::make_dtor)
> (cpname_state::make_builtin_type, cpname_state::make_name)
> (cpname_state::d_qualify, cpname_state::d_int_type)
> (cpname_state::d_unary, cpname_state::d_binary): Now methods.
> (%union): Move earlier.
Thanks, LGTM.
Pedro Alves
More information about the Gdb-patches
mailing list