name-lookup.c (leave_scope): We only need to update class_binding_level when leaving a class scope.
* name-lookup.c (leave_scope): We only need to update class_binding_level when leaving a class scope. From-SVN: r91807
This commit is contained in:
parent
5f679db991
commit
5423d7ebe1
|
@ -1,3 +1,8 @@
|
||||||
|
2004-12-07 Roger Sayle <roger@eyesopen.com>
|
||||||
|
|
||||||
|
* name-lookup.c (leave_scope): We only need to update
|
||||||
|
class_binding_level when leaving a class scope.
|
||||||
|
|
||||||
2004-12-06 Ziemowit Laski <zlaski@apple.com>
|
2004-12-06 Ziemowit Laski <zlaski@apple.com>
|
||||||
|
|
||||||
* cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
|
* cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
|
||||||
|
|
|
@ -1329,11 +1329,16 @@ leave_scope (void)
|
||||||
|
|
||||||
/* Find the innermost enclosing class scope, and reset
|
/* Find the innermost enclosing class scope, and reset
|
||||||
CLASS_BINDING_LEVEL appropriately. */
|
CLASS_BINDING_LEVEL appropriately. */
|
||||||
for (scope = current_binding_level;
|
if (scope->kind == sk_class)
|
||||||
scope && scope->kind != sk_class;
|
{
|
||||||
scope = scope->level_chain)
|
class_binding_level = NULL;
|
||||||
;
|
for (scope = current_binding_level; scope; scope = scope->level_chain)
|
||||||
class_binding_level = scope && scope->kind == sk_class ? scope : NULL;
|
if (scope->kind == sk_class)
|
||||||
|
{
|
||||||
|
class_binding_level = scope;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return current_binding_level;
|
return current_binding_level;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue