Friend class name lookup 2/n, PR c++/14513, c++/15410
commit1fadf2c820097b85041a933084e94a9ee64243c9
authorlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 25 Nov 2004 16:55:34 +0000 (25 16:55 +0000)
committerlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 25 Nov 2004 16:55:34 +0000 (25 16:55 +0000)
tree09d2e60d7ceba6434ad38c297762a3642c26dfda
parent6338935c9c4842afb5e62b889b025d326bab5f99
Friend class name lookup 2/n, PR c++/14513, c++/15410
* name-lookup.c (lookup_name_real): Simplify.
(lookup_type_scope): Add SCOPE parameter.  Handle friend class
lookup.
* name-lookup.h (tag_scope): New enum type.
(lookup_type_scope): Adjust declaration.
* decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
(start_enum): Likewise.  Add assertion test that NAME is
IDENTIFIER_NODE.  Use anonymous name for dummy ENUMERAL_TYPE in
case of error.
* cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
* parser.c (cp_parser_elaborated_type_specifier,
cp_parser_class_head): Adjust call to xref_tag.
* pt.c (lookup_template_class, instantiate_class_template):
Likewise.
* rtti.c (init_rtti_processing, build_dynamic_cast_1,
tinfo_base_init, emit_support_tinfos): Likewise.

* g++.dg/lookup/friend2.C: New test.
* g++.dg/template/friend31.C: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91299 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/name-lookup.c
gcc/cp/name-lookup.h
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/rtti.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/friend2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/friend31.C [new file with mode: 0644]