From: Simon Martin Date: Thu, 9 Jul 2009 21:57:54 +0000 (+0000) Subject: pt.c (perform_typedefs_access_check, [...]): Use CLASS_TYPE_P. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9dbed529312a92a31521b2b1153e4042d252c035;p=platform%2Fupstream%2Fgcc.git pt.c (perform_typedefs_access_check, [...]): Use CLASS_TYPE_P. gcc/cp/ 2008-07-08 Simon Martin Jason Merrill * pt.c (perform_typedefs_access_check, get_types_needing_access_check, append_type_to_template_for_access_check_1): Use CLASS_TYPE_P. Co-Authored-By: Jason Merrill From-SVN: r149439 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8e3b907..604ba46 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2008-07-09 Simon Martin + Jason Merrill + + * pt.c (perform_typedefs_access_check, get_types_needing_access_check, + append_type_to_template_for_access_check_1): Use CLASS_TYPE_P. + 2009-07-09 Dodji Seketeli PR c++/40684 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index d042f98..68250c2 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -7143,7 +7143,7 @@ perform_typedefs_access_check (tree tmpl, tree targs) tree t; if (!tmpl - || (!RECORD_OR_UNION_CODE_P (TREE_CODE (tmpl)) + || (!CLASS_TYPE_P (tmpl) && TREE_CODE (tmpl) != FUNCTION_DECL)) return; @@ -17513,7 +17513,7 @@ get_types_needing_access_check (tree t) if (!(ti = get_template_info (t))) return NULL_TREE; - if (RECORD_OR_UNION_CODE_P (TREE_CODE (t)) + if (CLASS_TYPE_P (t) || TREE_CODE (t) == FUNCTION_DECL) { if (!TI_TEMPLATE (ti)) @@ -17546,7 +17546,7 @@ append_type_to_template_for_access_check_1 (tree t, return; gcc_assert ((TREE_CODE (t) == FUNCTION_DECL - || RECORD_OR_UNION_CODE_P (TREE_CODE (t))) + || CLASS_TYPE_P (t)) && type_decl && TREE_CODE (type_decl) == TYPE_DECL && scope);