From eae49211e13efa075d57ab354ea4207666eadc96 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 13 Aug 2017 10:37:13 -0600 Subject: Remove make_cleanup_clear_parser_state This removes make_cleanup_clear_parser_state in favor of scoped_restore. 2017-09-05 Tom Tromey * utils.c (do_clear_parser_state): Remove. (make_cleanup_clear_parser_state): Remove. * p-exp.y (pascal_parse): Use scoped_restore. * m2-exp.y (m2_parse): Use scoped_restore. * f-exp.y (f_parse): Use scoped_restore. * d-exp.y (d_parse): Use scoped_restore. * c-exp.y (c_parse): Use scoped_restore. * ada-exp.y (ada_parse): Use scoped_restore. * utils.h (make_cleanup_clear_parser_state): Remove. --- gdb/c-exp.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/c-exp.y') diff --git a/gdb/c-exp.y b/gdb/c-exp.y index bcc3e12..43af80c 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -3232,6 +3232,7 @@ c_parse (struct parser_state *par_state) struct cleanup *back_to; /* Setting up the parser state. */ + scoped_restore pstate_restore = make_scoped_restore (&pstate); gdb_assert (par_state != NULL); pstate = par_state; @@ -3239,7 +3240,6 @@ c_parse (struct parser_state *par_state) assuming they'll be run here (below). */ back_to = make_cleanup (free_current_contents, &expression_macro_scope); - make_cleanup_clear_parser_state (&pstate); /* Set up the scope for macro expansion. */ expression_macro_scope = NULL; -- cgit v1.1