We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 27cad48 commit e996637Copy full SHA for e996637
1 file changed
test/testcondition.cpp
@@ -5893,6 +5893,17 @@ class TestCondition : public TestFixture {
5893
" return i;\n"
5894
"}\n");
5895
ASSERT_EQUALS("", errout_str());
5896
+
5897
+ check("void g(const int*);\n"
5898
+ "int f(const int* const p) {\n"
5899
+ " int i = 0;\n"
5900
+ " if (*p == 0)\n"
5901
+ " g(p);\n"
5902
5903
+ " i = 1;\n"
5904
+ " return i;\n"
5905
+ "}\n");
5906
+ ASSERT_EQUALS("[test.cpp:6:9]: (style) The if condition is the same as the previous if condition [duplicateCondition]\n", errout_str());
5907
}
5908
5909
void checkInvalidTestForOverflow() {
0 commit comments