Revert patch for 11617 which accidently crept in
From-SVN: r69779
This commit is contained in:
parent
a91db71189
commit
e710066d27
27
gcc/cp/pt.c
27
gcc/cp/pt.c
|
@ -7150,7 +7150,8 @@ tsubst_qualified_id (tree qualified_id, tree args,
|
|||
}
|
||||
|
||||
if (!BASELINK_P (name) && !DECL_P (expr))
|
||||
expr = lookup_qualified_name (scope, expr, /*is_type_p=*/0, false);
|
||||
expr = lookup_qualified_name (scope, expr, /*is_type_p=*/0,
|
||||
(complain & tf_error) != 0);
|
||||
if (DECL_P (expr))
|
||||
check_accessibility_of_qualified_id (expr,
|
||||
/*object_type=*/NULL_TREE,
|
||||
|
@ -7167,9 +7168,7 @@ tsubst_qualified_id (tree qualified_id, tree args,
|
|||
if (is_template)
|
||||
expr = lookup_template_function (expr, template_args);
|
||||
|
||||
if (expr == error_mark_node && complain & tf_error)
|
||||
nested_name_lookup_error (scope, TREE_OPERAND (qualified_id, 1));
|
||||
else if (TYPE_P (scope))
|
||||
if (TYPE_P (scope))
|
||||
{
|
||||
expr = (adjust_result_of_qualified_name_lookup
|
||||
(expr, scope, current_class_type));
|
||||
|
@ -7590,15 +7589,12 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl)
|
|||
{
|
||||
tree scope = DECL_INITIAL (decl);
|
||||
tree name = DECL_NAME (decl);
|
||||
tree decl;
|
||||
|
||||
scope = tsubst_expr (scope, args, complain, in_decl);
|
||||
decl = lookup_qualified_name (scope, name,
|
||||
/*is_type_p=*/0, /*complain=*/false);
|
||||
if (decl == error_mark_node)
|
||||
nested_name_lookup_error (scope, name);
|
||||
else
|
||||
do_local_using_decl (decl);
|
||||
do_local_using_decl (lookup_qualified_name (scope,
|
||||
name,
|
||||
/*is_type_p=*/0,
|
||||
/*complain=*/true));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -8256,15 +8252,18 @@ tsubst_copy_and_build (tree t,
|
|||
scope is. */
|
||||
tmpl = TREE_OPERAND (TREE_OPERAND (member, 1), 0);
|
||||
args = TREE_OPERAND (TREE_OPERAND (member, 1), 1);
|
||||
member = lookup_qualified_name (TREE_OPERAND (member, 0), tmpl,
|
||||
/*is_type=*/0, /*complain=*/false);
|
||||
member = lookup_qualified_name (TREE_OPERAND (member, 0),
|
||||
tmpl,
|
||||
/*is_type=*/0,
|
||||
/*complain=*/true);
|
||||
if (BASELINK_P (member))
|
||||
BASELINK_FUNCTIONS (member)
|
||||
= build_nt (TEMPLATE_ID_EXPR, BASELINK_FUNCTIONS (member),
|
||||
args);
|
||||
else
|
||||
{
|
||||
nested_name_lookup_error (TREE_TYPE (object), tmpl);
|
||||
error ("`%D' is not a member of `%T'",
|
||||
tmpl, TREE_TYPE (object));
|
||||
return error_mark_node;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue