Module Name: src
Committed By: rillig
Date: Sat Jan 16 17:54:22 UTC 2021
Modified Files:
src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c
src/usr.bin/xlint/lint1: tree.c
Log Message:
lint: remove redundant calls to before_conversion
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
cvs rdiff -u -r1.157 -r1.158 src/usr.bin/xlint/lint1/tree.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.10 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.11
--- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.10 Sat Jan 16 16:58:39 2021
+++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c Sat Jan 16 17:54:22 2021
@@ -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 @@ strict_bool_operand_unary_address(void)
* 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
Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.157 src/usr.bin/xlint/lint1/tree.c:1.158
--- src/usr.bin/xlint/lint1/tree.c:1.157 Sat Jan 16 16:53:23 2021
+++ src/usr.bin/xlint/lint1/tree.c Sat Jan 16 17:54:22 2021
@@ -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 @@ typeok_scalar_strict_bool(op_t op, const
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 @@ typeok_scalar_strict_bool(op_t op, const
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;