Remove make_cleanup_clear_parser_state
[deliverable/binutils-gdb.git] / gdb / m2-exp.y
index 9179187aa20e2125d774e04480835896bf38a56f..02dc36f48036e882fbfdb4e3f223abf3864934b0 100644 (file)
@@ -1036,17 +1036,12 @@ yylex (void)
 int
 m2_parse (struct parser_state *par_state)
 {
-  int result;
-  struct cleanup *c = make_cleanup_clear_parser_state (&pstate);
-
   /* Setting up the parser state.  */
+  scoped_restore pstate_restore = make_scoped_restore (&pstate);
   gdb_assert (par_state != NULL);
   pstate = par_state;
 
-  result = yyparse ();
-  do_cleanups (c);
-
-  return result;
+  return yyparse ();
 }
 
 void
This page took 0.030848 seconds and 4 git commands to generate.