pt.c (perform_typedefs_access_check, [...]): Use CLASS_TYPE_P.
authorSimon Martin <simartin@users.sourceforge.net>
Thu, 9 Jul 2009 21:57:54 +0000 (21:57 +0000)
committerSimon Martin <simartin@gcc.gnu.org>
Thu, 9 Jul 2009 21:57:54 +0000 (21:57 +0000)
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

gcc/cp/ChangeLog
gcc/cp/pt.c

index 8e3b907..604ba46 100644 (file)
@@ -1,3 +1,9 @@
+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>
 
        PR c++/40684
index d042f98..68250c2 100644 (file)
@@ -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);