c++: remove redundand NULL check.
authorMartin Liska <mliska@suse.cz>
Tue, 16 Mar 2021 12:22:55 +0000 (13:22 +0100)
committerMartin Liska <mliska@suse.cz>
Mon, 10 May 2021 07:20:39 +0000 (09:20 +0200)
gcc/cp/ChangeLog:

PR c++/99616
* decl.c (grokdeclarator): Remove redundant NULL check.

gcc/cp/decl.c

index 316ad4c..8bf524b 100644 (file)
@@ -12310,7 +12310,7 @@ grokdeclarator (const cp_declarator *declarator,
          int attr_flags;
 
          attr_flags = 0;
-         if (declarator == NULL || declarator->kind == cdk_id)
+         if (declarator->kind == cdk_id)
            attr_flags |= (int) ATTR_FLAG_DECL_NEXT;
          if (declarator->kind == cdk_function)
            attr_flags |= (int) ATTR_FLAG_FUNCTION_NEXT;