Commit 9dbed529 by Simon Martin Committed by Simon Martin

pt.c (perform_typedefs_access_check, [...]): Use CLASS_TYPE_P.

gcc/cp/

2008-07-08  Simon Martin  <simartin@users.sourceforge.net>
	    Jason Merrill  <jason@redhat.com>

	* 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 <jason@redhat.com>

From-SVN: r149439
parent 116b0722
2008-07-09 Simon Martin <simartin@users.sourceforge.net>
Jason Merrill <jason@redhat.com>
* 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 <dodji@redhat.com> 2009-07-09 Dodji Seketeli <dodji@redhat.com>
PR c++/40684 PR c++/40684
......
...@@ -7143,7 +7143,7 @@ perform_typedefs_access_check (tree tmpl, tree targs) ...@@ -7143,7 +7143,7 @@ perform_typedefs_access_check (tree tmpl, tree targs)
tree t; tree t;
if (!tmpl if (!tmpl
|| (!RECORD_OR_UNION_CODE_P (TREE_CODE (tmpl)) || (!CLASS_TYPE_P (tmpl)
&& TREE_CODE (tmpl) != FUNCTION_DECL)) && TREE_CODE (tmpl) != FUNCTION_DECL))
return; return;
...@@ -17513,7 +17513,7 @@ get_types_needing_access_check (tree t) ...@@ -17513,7 +17513,7 @@ get_types_needing_access_check (tree t)
if (!(ti = get_template_info (t))) if (!(ti = get_template_info (t)))
return NULL_TREE; return NULL_TREE;
if (RECORD_OR_UNION_CODE_P (TREE_CODE (t)) if (CLASS_TYPE_P (t)
|| TREE_CODE (t) == FUNCTION_DECL) || TREE_CODE (t) == FUNCTION_DECL)
{ {
if (!TI_TEMPLATE (ti)) if (!TI_TEMPLATE (ti))
...@@ -17546,7 +17546,7 @@ append_type_to_template_for_access_check_1 (tree t, ...@@ -17546,7 +17546,7 @@ append_type_to_template_for_access_check_1 (tree t,
return; return;
gcc_assert ((TREE_CODE (t) == FUNCTION_DECL gcc_assert ((TREE_CODE (t) == FUNCTION_DECL
|| RECORD_OR_UNION_CODE_P (TREE_CODE (t))) || CLASS_TYPE_P (t))
&& type_decl && type_decl
&& TREE_CODE (type_decl) == TYPE_DECL && TREE_CODE (type_decl) == TYPE_DECL
&& scope); && scope);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment