public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/PR99616-redundant-null-check)] c++: remove redundand NULL check.
@ 2021-03-16 12:23 Martin Liska
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2021-03-16 12:23 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:51ab0bb5fe16d412b98a4a168f774f16d8fe1340

commit 51ab0bb5fe16d412b98a4a168f774f16d8fe1340
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Mar 16 13:22:55 2021 +0100

    c++: remove redundand NULL check.
    
    gcc/cp/ChangeLog:
    
            PR c++/99616
            * decl.c (grokdeclarator): Remove redundant NULL check.

Diff:
---
 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 1b671cec9a3..ab701860283 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -12217,7 +12217,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;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gcc(refs/users/marxin/heads/PR99616-redundant-null-check)] c++: remove redundand NULL check.
@ 2021-03-18 16:08 Martin Liska
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2021-03-18 16:08 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2e9636f4fb3428d86f9265ecfbc181848ffbba8d

commit 2e9636f4fb3428d86f9265ecfbc181848ffbba8d
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Mar 16 13:22:55 2021 +0100

    c++: remove redundand NULL check.
    
    gcc/cp/ChangeLog:
    
            PR c++/99616
            * decl.c (grokdeclarator): Remove redundant NULL check.

Diff:
---
 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 8e8f37d060e..dc2c79997ee 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -12244,7 +12244,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;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-18 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 12:23 [gcc(refs/users/marxin/heads/PR99616-redundant-null-check)] c++: remove redundand NULL check Martin Liska
2021-03-18 16:08 Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).