From 0d99c9e73026839ce4a7dfc4617cf7df22aef64c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 26 May 2003 11:36:36 +0000 Subject: check for "0 or ..." --- perl_checker.src/parser_helper.ml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'perl_checker.src/parser_helper.ml') diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml index 944713b..dd3428f 100644 --- a/perl_checker.src/parser_helper.ml +++ b/perl_checker.src/parser_helper.ml @@ -642,6 +642,11 @@ let cook_call_op op para pos = | "||", e :: _ when is_always_false e -> warn_rule " || ... is the same as ..."; call | "&&", e :: _ when is_always_true e -> warn_rule " && ... is the same as ..."; call + | "or", e :: _ when is_always_true (un_parenthesize_full e) -> warn_rule " or ... is the same as "; call + | "and", e :: _ when is_always_false (un_parenthesize_full e) -> warn_rule " and ... is the same as "; call + | "or", e :: _ when is_always_false (un_parenthesize_full e) -> warn_rule " or ... is the same as ..."; call + | "and", e :: _ when is_always_true (un_parenthesize_full e) -> warn_rule " and ... is the same as ..."; call + | _ -> call -- cgit v1.2.1