Commit c65a922c by Theodore Papadopoulo Committed by Jason Merrill

init.c (build_offset_ref): Handle the case of a templated member function.

        * init.c (build_offset_ref): Handle the case of a templated member
        function.

From-SVN: r32649
parent 949d707d
2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
* init.c (build_offset_ref): Handle the case of a templated member
function.
2000-03-19 Martin v. Lwis <loewis@informatik.hu-berlin.de>
* except.c (expand_exception_blocks): Clear catch_clauses_last.
......
......@@ -1577,9 +1577,21 @@ build_offset_ref (type, name)
the template-id that was used. */
name = TREE_OPERAND (orig_name, 0);
if (TREE_CODE (name) == LOOKUP_EXPR)
/* This can happen during tsubst'ing. */
name = TREE_OPERAND (name, 0);
if (DECL_P (name))
name = DECL_NAME (name);
else
{
if (TREE_CODE (name) == LOOKUP_EXPR)
/* This can happen during tsubst'ing. */
name = TREE_OPERAND (name, 0);
else
{
if (TREE_CODE (name) == COMPONENT_REF)
name = TREE_OPERAND (name, 1);
if (TREE_CODE (name) == OVERLOAD)
name = DECL_NAME (OVL_CURRENT (name));
}
}
my_friendly_assert (TREE_CODE (name) == IDENTIFIER_NODE, 0);
}
......
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