diff options
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r-- | gdb/c-exp.y | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y index f53a138..14d4b70 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -3042,10 +3042,6 @@ classify_name (struct parser_state *par_state, const struct block *block, std::string copy = copy_name (yylval.sval); - /* Initialize this in case we *don't* use it in this call; that way - we can refer to it unconditionally below. */ - memset (&is_a_field_of_this, 0, sizeof (is_a_field_of_this)); - bsym = lookup_symbol (copy.c_str (), block, SEARCH_VFT, par_state->language ()->name_of_this () ? &is_a_field_of_this : NULL); @@ -3396,18 +3392,18 @@ c_parse (struct parser_state *par_state) c_parse_state cstate; scoped_restore cstate_restore = make_scoped_restore (&cpstate, &cstate); - gdb::unique_xmalloc_ptr<struct macro_scope> macro_scope; + macro_scope macro_scope; if (par_state->expression_context_block) macro_scope = sal_macro_scope (find_pc_line (par_state->expression_context_pc, 0)); else macro_scope = default_macro_scope (); - if (! macro_scope) + if (!macro_scope.is_valid ()) macro_scope = user_macro_scope (); scoped_restore restore_macro_scope - = make_scoped_restore (&expression_macro_scope, macro_scope.get ()); + = make_scoped_restore (&expression_macro_scope, ¯o_scope); scoped_restore restore_yydebug = make_scoped_restore (&yydebug, par_state->debug); |