From 9ededfc5d0d49306e9f9a98007374c06ace6fc74 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sun, 31 Mar 2013 11:15:46 +0000 Subject: decl2.c (collect_candidates_for_java_method_aliases): Use DECL_CLASS_SCOPE_P. 2013-03-31 Paolo Carlini * decl2.c (collect_candidates_for_java_method_aliases): Use DECL_CLASS_SCOPE_P. * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P. (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P. * decl.c (duplicate_decls): Likewise. * parser.c (cp_parser_template_declaration_after_export): Likewise, also DECL_DECLARES_TYPE_P. * pt.c (instantiate_class_template_1): Likewise. * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P. (lookup_field_r): Likewise. (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P. (lookup_fnfields_slot_nolazy): Likewise. * semantics.c (finish_member_declaration): Likewise. * typeck.c (convert_for_initialization): Use TYPE_REFFN_P. From-SVN: r197283 --- gcc/cp/name-lookup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc/cp/name-lookup.c') diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index b25db14..e09eca1 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -887,7 +887,7 @@ pushdecl_maybe_friend_1 (tree x, bool is_friend) add_decl_to_level (x, NAMESPACE_LEVEL (CP_DECL_CONTEXT (t))); } - if (TREE_CODE (t) == FUNCTION_DECL || DECL_FUNCTION_TEMPLATE_P (t)) + if (DECL_DECLARES_FUNCTION_P (t)) check_default_args (t); if (t != x || DECL_FUNCTION_TEMPLATE_P (t)) @@ -5823,8 +5823,7 @@ pushtag_1 (tree name, tree type, tag_scope scope) convenient way. (It's otherwise tricky to find a member function definition it's only pointed to from within a local class.) */ - if (TYPE_CONTEXT (type) - && TREE_CODE (TYPE_CONTEXT (type)) == FUNCTION_DECL) + if (TYPE_FUNCTION_SCOPE_P (type)) { if (processing_template_decl) { -- cgit v1.1