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))
|
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))
|
if (DECL_P (expr))
|
||||||
check_accessibility_of_qualified_id (expr,
|
check_accessibility_of_qualified_id (expr,
|
||||||
/*object_type=*/NULL_TREE,
|
/*object_type=*/NULL_TREE,
|
||||||
|
@ -7167,9 +7168,7 @@ tsubst_qualified_id (tree qualified_id, tree args,
|
||||||
if (is_template)
|
if (is_template)
|
||||||
expr = lookup_template_function (expr, template_args);
|
expr = lookup_template_function (expr, template_args);
|
||||||
|
|
||||||
if (expr == error_mark_node && complain & tf_error)
|
if (TYPE_P (scope))
|
||||||
nested_name_lookup_error (scope, TREE_OPERAND (qualified_id, 1));
|
|
||||||
else if (TYPE_P (scope))
|
|
||||||
{
|
{
|
||||||
expr = (adjust_result_of_qualified_name_lookup
|
expr = (adjust_result_of_qualified_name_lookup
|
||||||
(expr, scope, current_class_type));
|
(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 scope = DECL_INITIAL (decl);
|
||||||
tree name = DECL_NAME (decl);
|
tree name = DECL_NAME (decl);
|
||||||
tree decl;
|
|
||||||
|
|
||||||
scope = tsubst_expr (scope, args, complain, in_decl);
|
scope = tsubst_expr (scope, args, complain, in_decl);
|
||||||
decl = lookup_qualified_name (scope, name,
|
do_local_using_decl (lookup_qualified_name (scope,
|
||||||
/*is_type_p=*/0, /*complain=*/false);
|
name,
|
||||||
if (decl == error_mark_node)
|
/*is_type_p=*/0,
|
||||||
nested_name_lookup_error (scope, name);
|
/*complain=*/true));
|
||||||
else
|
|
||||||
do_local_using_decl (decl);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -8256,15 +8252,18 @@ tsubst_copy_and_build (tree t,
|
||||||
scope is. */
|
scope is. */
|
||||||
tmpl = TREE_OPERAND (TREE_OPERAND (member, 1), 0);
|
tmpl = TREE_OPERAND (TREE_OPERAND (member, 1), 0);
|
||||||
args = TREE_OPERAND (TREE_OPERAND (member, 1), 1);
|
args = TREE_OPERAND (TREE_OPERAND (member, 1), 1);
|
||||||
member = lookup_qualified_name (TREE_OPERAND (member, 0), tmpl,
|
member = lookup_qualified_name (TREE_OPERAND (member, 0),
|
||||||
/*is_type=*/0, /*complain=*/false);
|
tmpl,
|
||||||
|
/*is_type=*/0,
|
||||||
|
/*complain=*/true);
|
||||||
if (BASELINK_P (member))
|
if (BASELINK_P (member))
|
||||||
BASELINK_FUNCTIONS (member)
|
BASELINK_FUNCTIONS (member)
|
||||||
= build_nt (TEMPLATE_ID_EXPR, BASELINK_FUNCTIONS (member),
|
= build_nt (TEMPLATE_ID_EXPR, BASELINK_FUNCTIONS (member),
|
||||||
args);
|
args);
|
||||||
else
|
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;
|
return error_mark_node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue