* c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
authorMarek Polacek <polacek@redhat.com>
Fri, 26 Jun 2015 08:07:23 +0000 (08:07 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 26 Jun 2015 08:07:23 +0000 (08:07 +0000)
From-SVN: r224996

gcc/c-family/ChangeLog
gcc/c-family/c-common.c

index 619bca64c5fe500b83698736afc59bdf831475dd..fc88354937dcc283e02b64a68c722caf404aca47 100644 (file)
@@ -1,3 +1,7 @@
+2015-06-26  Marek Polacek  <polacek@redhat.com>
+
+       * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
+
 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
 
        * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
index 73d0c7f11fcc1c33960cb577c0c593157bd57725..b11a7563dc1e9473f42e9972e4591a4d1d335f86 100644 (file)
@@ -7376,8 +7376,7 @@ handle_unused_attribute (tree *node, tree name, tree ARG_UNUSED (args),
       tree decl = *node;
 
       if (TREE_CODE (decl) == PARM_DECL
-         || VAR_P (decl)
-         || TREE_CODE (decl) == FUNCTION_DECL
+         || VAR_OR_FUNCTION_DECL_P (decl)
          || TREE_CODE (decl) == LABEL_DECL
          || TREE_CODE (decl) == TYPE_DECL)
        {