We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a30eab commit c3af708Copy full SHA for c3af708
1 file changed
test/testcondition.cpp
@@ -4024,6 +4024,13 @@ class TestCondition : public TestFixture {
4024
"}\n");
4025
ASSERT_EQUALS("[test.cpp:3]: (style) Condition 'i<=18' is always true\n", errout.str());
4026
4027
+ // #8209
4028
+ check("void f() {\n"
4029
+ " for(int x = 0; x < 3; ++x)\n"
4030
+ " if(x == -5) {}\n"
4031
+ "}");
4032
+ ASSERT_EQUALS("[test.cpp:3]: (style) Condition 'x==-5' is always false\n", errout.str());
4033
+
4034
check("void f(unsigned int u1, unsigned int u2) {\n"
4035
" if (u1 <= 10 && u2 >= 20) {\n"
4036
" if (u1 != u2) {}\n"
0 commit comments