]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/cp/pt.c
cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
[thirdparty/gcc.git] / gcc / cp / pt.c
index b6066c18bdea016123d60a8ce859b6b12e4579ed..bb690c5009ff97bcb744d8176474ba3fa0fcb9fd 100644 (file)
@@ -213,9 +213,8 @@ static tree instantiate_alias_template (tree, tree, tsubst_flags_t);
 static void
 push_access_scope (tree t)
 {
-  gcc_assert (TREE_CODE (t) == FUNCTION_DECL
-             || TREE_CODE (t) == TYPE_DECL
-             || TREE_CODE (t) == VAR_DECL);
+  gcc_assert (VAR_OR_FUNCTION_DECL_P (t)
+             || TREE_CODE (t) == TYPE_DECL);
 
   if (DECL_FRIEND_CONTEXT (t))
     push_nested_class (DECL_FRIEND_CONTEXT (t));
@@ -18598,8 +18597,7 @@ instantiate_decl (tree d, int defer_ok,
 
   /* This function should only be used to instantiate templates for
      functions and static member variables.  */
-  gcc_assert (TREE_CODE (d) == FUNCTION_DECL
-             || TREE_CODE (d) == VAR_DECL);
+  gcc_assert (VAR_OR_FUNCTION_DECL_P (d));
 
   /* Variables are never deferred; if instantiation is required, they
      are instantiated right away.  That allows for better code in the