summaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-27 21:35:17 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-27 21:35:17 +0000
commit1f07118efd627bef5aed88db1f9d840ce6ab743f (patch)
treedb906e8fcd48502db7eacdfb8c20e1ca0ab41374 /gcc/cp/semantics.c
parent70269a57a8e4b7428eff50077451d4a9648afe70 (diff)
downloadgcc-1f07118efd627bef5aed88db1f9d840ce6ab743f.tar.gz
* tree.c (get_fns): Split out from get_first_fn.
* cp-tree.h: Declare it. * search.c (shared_member_p): Use it. * semantics.c (finish_qualified_id_expr): Simplify. (finish_id_expression): Simplify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158810 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 73fed153801..d4ce01496ee 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -1662,15 +1662,11 @@ finish_qualified_id_expr (tree qualifying_class,
}
else if (BASELINK_P (expr) && !processing_template_decl)
{
- tree fns;
tree ob;
/* See if any of the functions are non-static members. */
- fns = BASELINK_FUNCTIONS (expr);
- if (TREE_CODE (fns) == TEMPLATE_ID_EXPR)
- fns = TREE_OPERAND (fns, 0);
/* If so, the expression may be relative to 'this'. */
- if (!shared_member_p (fns)
+ if (!shared_member_p (expr)
&& (ob = maybe_dummy_object (qualifying_class, NULL),
!is_dummy_object (ob)))
expr = (build_class_member_access_expr
@@ -3124,10 +3120,7 @@ finish_id_expression (tree id_expression,
{
tree first_fn;
- first_fn = decl;
- if (TREE_CODE (first_fn) == TEMPLATE_ID_EXPR)
- first_fn = TREE_OPERAND (first_fn, 0);
- first_fn = get_first_fn (first_fn);
+ first_fn = get_first_fn (decl);
if (TREE_CODE (first_fn) == TEMPLATE_DECL)
first_fn = DECL_TEMPLATE_RESULT (first_fn);