aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index b6066c1..bb690c5 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -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