Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: remove redundant calls to before_c...



details:   https://anonhg.NetBSD.org/src/rev/df35c22bb315
branches:  trunk
changeset: 949773:df35c22bb315
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jan 16 17:54:22 2021 +0000

description:
lint: remove redundant calls to before_conversion

diffstat:

 tests/usr.bin/xlint/lint1/d_c99_bool_strict.c |  6 +++---
 usr.bin/xlint/lint1/tree.c                    |  8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r 4d0303457b38 -r df35c22bb315 tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
--- a/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c     Sat Jan 16 16:58:39 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c     Sat Jan 16 17:54:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_c99_bool_strict.c,v 1.10 2021/01/16 16:58:39 rillig Exp $    */
+/*     $NetBSD: d_c99_bool_strict.c,v 1.11 2021/01/16 17:54:22 rillig Exp $    */
 # 3 "d_c99_bool_strict.c"
 
 /*
@@ -38,7 +38,7 @@
  *     Operator        left:   bool?   other?  right:  bool?   other?
  *     .                       -       yes             yes     yes
  *     ->                      -       yes             yes     yes
- *     <=, <, >=, >            yes     yes             yes     yes
+ *     <=, <, >=, >            -       yes             -       yes
  *     ==, !=                  yes     yes             yes     yes
  *     &                       yes     yes             yes     yes
  *     ^                       yes     yes             yes     yes
@@ -443,7 +443,7 @@
  *     Operator        left:   bool?   other?  right:  bool?   other?
  *     .                       -       yes             yes     yes
  *     ->                      -       yes             yes     yes
- *     <=, <, >=, >            yes     yes             yes     yes
+ *     <=, <, >=, >            -       yes             -       yes
  *     ==, !=                  yes     yes             yes     yes
  *     &                       yes     yes             yes     yes
  *     ^                       yes     yes             yes     yes
diff -r 4d0303457b38 -r df35c22bb315 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Sat Jan 16 16:58:39 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Sat Jan 16 17:54:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.157 2021/01/16 16:53:23 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.158 2021/01/16 17:54:22 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.157 2021/01/16 16:53:23 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.158 2021/01/16 17:54:22 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -1171,7 +1171,7 @@
 
        if (!mp->m_takes_bool) {
                bool binary = mp->m_binary;
-               bool lbool = before_conversion(ln)->tn_type->t_tspec == BOOL;
+               bool lbool = ln->tn_type->t_tspec == BOOL;
                bool ok = true;
 
                if (!binary && lbool) {
@@ -1184,7 +1184,7 @@
                        error(336, getopname(op));
                        ok = false;
                }
-               if (binary && before_conversion(rn)->tn_type->t_tspec == BOOL) {
+               if (binary && rn->tn_type->t_tspec == BOOL) {
                        /* right operand of '%s' must not be bool */
                        error(337, getopname(op));
                        ok = false;



Home | Main Index | Thread Index | Old Index