Commit 118dde55 by Jason Merrill Committed by Jason Merrill

re PR c++/37558 (rev 140120 changes the accessibility of a friend decl.)

        PR c++/37588
        * name-lookup.c (lookup_type_scope): Look through sk_function_parms.

From-SVN: r140424
parent 8aff539b
2008-09-17 Jason Merrill <jason@redhat.com>
PR c++/37588
* name-lookup.c (lookup_type_scope): Look through sk_function_parms.
2008-09-17 Jakub Jelinek <jakub@redhat.com>
PR c++/37552
......
......@@ -4282,7 +4282,8 @@ lookup_type_scope (tree name, tag_scope scope)
if (iter->scope == b)
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, val);
if (b->kind == sk_cleanup || b->kind == sk_template_parms)
if (b->kind == sk_cleanup || b->kind == sk_template_parms
|| b->kind == sk_function_parms)
b = b->level_chain;
else if (b->kind == sk_class
&& scope == ts_within_enclosing_non_class)
......
// PR c++/37558
class Foo {
friend class Bar;
friend void func(const class Bar*);
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment