aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/name-lookup.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2013-03-31 11:15:46 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2013-03-31 11:15:46 +0000
commit9ededfc5d0d49306e9f9a98007374c06ace6fc74 (patch)
tree5ad67559d56d4a15cb8a9a36539b90eadff292d1 /gcc/cp/name-lookup.c
parentcbde6c0f8a7e66e7ab07fd5514350237af0b27da (diff)
downloadgcc-9ededfc5d0d49306e9f9a98007374c06ace6fc74.zip
gcc-9ededfc5d0d49306e9f9a98007374c06ace6fc74.tar.gz
gcc-9ededfc5d0d49306e9f9a98007374c06ace6fc74.tar.bz2
decl2.c (collect_candidates_for_java_method_aliases): Use DECL_CLASS_SCOPE_P.
2013-03-31 Paolo Carlini <paolo.carlini@oracle.com> * 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
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r--gcc/cp/name-lookup.c5
1 files changed, 2 insertions, 3 deletions
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)
{