aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2020-09-14 14:49:31 -0400
committerMarek Polacek <polacek@redhat.com>2020-09-14 15:00:42 -0400
commitcd6743e9c412b35e4ec7d8ebd7df8b0eeece3f01 (patch)
tree8380bd22e0b22345735baf0b341853ae4e93ddb8 /gcc/cp
parent5bcc0fa05ef713594f6c6d55d5c837e13a9c9803 (diff)
downloadgcc-cd6743e9c412b35e4ec7d8ebd7df8b0eeece3f01.zip
gcc-cd6743e9c412b35e4ec7d8ebd7df8b0eeece3f01.tar.gz
gcc-cd6743e9c412b35e4ec7d8ebd7df8b0eeece3f01.tar.bz2
c++: Use VAR_OR_FUNCTION_DECL_P.
gcc/cp/ChangeLog: * pt.c (push_template_decl_real): Use VAR_OR_FUNCTION_DECL_P.
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/pt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 8124efc..c630ef5 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6072,8 +6072,7 @@ push_template_decl_real (tree decl, bool is_friend)
if (is_primary)
retrofit_lang_decl (decl);
if (DECL_LANG_SPECIFIC (decl)
- && ((TREE_CODE (decl) != VAR_DECL
- && TREE_CODE (decl) != FUNCTION_DECL)
+ && (!VAR_OR_FUNCTION_DECL_P (decl)
|| !ctx
|| !DECL_LOCAL_DECL_P (decl)))
DECL_TEMPLATE_INFO (decl) = info;