name-lookup.c (is_class_level): Remove.
* name-lookup.c (is_class_level): Remove. (push_binding_level, leave_scope, resume_scope): Adjust. (pushlevel_class): Adjust. (poplevel_class): Make sure we're on class_binding_level. From-SVN: r151527
This commit is contained in:
parent
02c5ff73d4
commit
f33ab5c3f1
|
@ -1,3 +1,10 @@
|
|||
2009-09-03 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* name-lookup.c (is_class_level): Remove.
|
||||
(push_binding_level, leave_scope, resume_scope): Adjust.
|
||||
(pushlevel_class): Adjust.
|
||||
(poplevel_class): Make sure we're on class_binding_level.
|
||||
|
||||
2009-09-02 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* decl.c (grokmethod): Rename from start_method.
|
||||
|
|
|
@ -1257,7 +1257,6 @@ check_for_out_of_scope_variable (tree decl)
|
|||
static bool keep_next_level_flag;
|
||||
|
||||
static int binding_depth = 0;
|
||||
static int is_class_level = 0;
|
||||
|
||||
static void
|
||||
indent (int depth)
|
||||
|
@ -1339,7 +1338,6 @@ push_binding_level (struct cp_binding_level *scope)
|
|||
scope->binding_depth = binding_depth;
|
||||
indent (binding_depth);
|
||||
cxx_scope_debug (scope, input_line, "push");
|
||||
is_class_level = 0;
|
||||
binding_depth++;
|
||||
}
|
||||
}
|
||||
|
@ -1427,12 +1425,6 @@ leave_scope (void)
|
|||
{
|
||||
indent (--binding_depth);
|
||||
cxx_scope_debug (scope, input_line, "leave");
|
||||
if (is_class_level != (scope == class_binding_level))
|
||||
{
|
||||
indent (binding_depth);
|
||||
verbatim ("XXX is_class_level != (current_scope == class_scope)\n");
|
||||
}
|
||||
is_class_level = 0;
|
||||
}
|
||||
|
||||
/* Move one nesting level up. */
|
||||
|
@ -1482,7 +1474,6 @@ resume_scope (struct cp_binding_level* b)
|
|||
b->binding_depth = binding_depth;
|
||||
indent (binding_depth);
|
||||
cxx_scope_debug (b, input_line, "resume");
|
||||
is_class_level = 0;
|
||||
binding_depth++;
|
||||
}
|
||||
}
|
||||
|
@ -2562,9 +2553,6 @@ pop_inner_scope (tree outer, tree inner)
|
|||
void
|
||||
pushlevel_class (void)
|
||||
{
|
||||
if (ENABLE_SCOPE_CHECKING)
|
||||
is_class_level = 1;
|
||||
|
||||
class_binding_level = begin_scope (sk_class, current_class_type);
|
||||
}
|
||||
|
||||
|
@ -2602,9 +2590,7 @@ poplevel_class (void)
|
|||
|
||||
/* Now, pop out of the binding level which we created up in the
|
||||
`pushlevel_class' routine. */
|
||||
if (ENABLE_SCOPE_CHECKING)
|
||||
is_class_level = 1;
|
||||
|
||||
gcc_assert (current_binding_level == level);
|
||||
leave_scope ();
|
||||
timevar_pop (TV_NAME_LOOKUP);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue