c++: Use VAR_OR_FUNCTION_DECL_P.
authorMarek Polacek <polacek@redhat.com>
Mon, 14 Sep 2020 18:49:31 +0000 (14:49 -0400)
committerMarek Polacek <polacek@redhat.com>
Mon, 14 Sep 2020 19:00:42 +0000 (15:00 -0400)
gcc/cp/ChangeLog:

* pt.c (push_template_decl_real): Use VAR_OR_FUNCTION_DECL_P.

gcc/cp/pt.c

index 8124efcbe243466e71b17d2f3ce5ae18b54b50cb..c630ef5a070bc96666bb23543bcf0266bdae6a63 100644 (file)
@@ -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;