From 818ea4cc74b7c21a3aaa5ae6fddb1d9005049022 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 29 Apr 2025 22:37:46 +0100 Subject: [PATCH] Fix clang [-Wconstant-logical-operand] warning in testcase warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] --- Examples/test-suite/expressions.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/test-suite/expressions.i b/Examples/test-suite/expressions.i index 40e42f789..318813161 100644 --- a/Examples/test-suite/expressions.i +++ b/Examples/test-suite/expressions.i @@ -16,7 +16,7 @@ struct A // Regression test for alternative operator names - this failed to parse in // SWIG 4.2.0 and earlier. - int g(int b = (compl 1 or not 2) xor (3 and 4) xor (3 bitand 6) xor (3 bitor 5) xor (2 + 2 not_eq 5)) { return b; } + int g(int b = (compl 1 or not 2) xor (1 and not false) xor (3 bitand 6) xor (3 bitor 5) xor (2 + 2 not_eq 5)) { return b; } }; const unsigned char LASTCHAR1 = "hello world"[sizeof"hello world" - 2];