We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76f1aac commit 59cf0baCopy full SHA for 59cf0ba
test/testcondition.cpp
@@ -5678,6 +5678,15 @@ class TestCondition : public TestFixture {
5678
"}\n");
5679
ASSERT_EQUALS("[test.cpp:2] -> [test.cpp:3]: (style) The if condition is the same as the previous if condition\n", errout_str());
5680
5681
+ check("struct S { int x; };\n" // #12391
5682
+ "int f(const struct S* a, const struct S* b) {\n"
5683
+ " const struct S* p = b;\n"
5684
+ " if (a->x < p->x) p++;\n"
5685
5686
+ " return p->x;\n"
5687
+ "}\n");
5688
+ ASSERT_EQUALS("", errout_str());
5689
+
5690
// do not crash
5691
check("void assign(const MMA& other) {\n"
5692
" if (mPA.cols != other.mPA.cols || mPA.rows != other.mPA.rows)\n"
0 commit comments