aboutsummaryrefslogtreecommitdiff
path: root/gdb/go-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-08-13 10:37:13 -0600
committerTom Tromey <tom@tromey.com>2017-09-06 15:49:30 -0600
commiteae49211e13efa075d57ab354ea4207666eadc96 (patch)
tree6cbf8e62f73a076d795c0fb3aacd84487037cd9a /gdb/go-exp.y
parent73b9be8b5301c4ac056e10c38a47414867ee892a (diff)
downloadgdb-eae49211e13efa075d57ab354ea4207666eadc96.zip
gdb-eae49211e13efa075d57ab354ea4207666eadc96.tar.gz
gdb-eae49211e13efa075d57ab354ea4207666eadc96.tar.bz2
Remove make_cleanup_clear_parser_state
This removes make_cleanup_clear_parser_state in favor of scoped_restore. 2017-09-05 Tom Tromey <tom@tromey.com> * 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.
Diffstat (limited to 'gdb/go-exp.y')
-rw-r--r--gdb/go-exp.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/go-exp.y b/gdb/go-exp.y
index f2f3596..098e734 100644
--- a/gdb/go-exp.y
+++ b/gdb/go-exp.y
@@ -1564,6 +1564,7 @@ go_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;
@@ -1573,7 +1574,6 @@ go_parse (struct parser_state *par_state)
scoped_restore restore_yydebug = make_scoped_restore (&yydebug,
parser_debug);
- make_cleanup_clear_parser_state (&pstate);
/* Initialize some state used by the lexer. */
last_was_structop = 0;