From 5cc8ef7e879a2bff060c648eee9e2b698c337d6e Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Sat, 20 Aug 2022 19:23:55 +0200 Subject: [PATCH] Add test for #9817 (#4388) * Add test for #8919 * Add test for #9817 * Revert --- test/testcondition.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/testcondition.cpp b/test/testcondition.cpp index 9459b1e15..df87884af 100644 --- a/test/testcondition.cpp +++ b/test/testcondition.cpp @@ -4298,6 +4298,13 @@ private: ASSERT_EQUALS("[test.cpp:3]: (style) Condition 'g()==1' is always false\n" "[test.cpp:3]: (style) Condition 'g()==-1' is always true\n", errout.str()); + + // #9817 + check("void f(float x) {\n" + " if (x <= 0) {}\n" + " else if (x < 1) {}\n" + "}\n"); + ASSERT_EQUALS("", errout.str()); } void alwaysTrueSymbolic()