From ec728fb0026bbe5bc9f0d9ccb4215000f77ab206 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 16 Mar 2021 13:22:55 +0100 Subject: [PATCH] c++: remove redundand NULL check. gcc/cp/ChangeLog: PR c++/99616 * decl.c (grokdeclarator): Remove redundant NULL check. --- gcc/cp/decl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 316ad4c..8bf524b 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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; -- 2.7.4