We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1407e6b commit c4aaad9Copy full SHA for c4aaad9
1 file changed
test/testother.cpp
@@ -4807,6 +4807,12 @@ class TestOther : public TestFixture {
4807
" return bar = 0;\n"
4808
"}\n");
4809
ASSERT_EQUALS("", errout_str());
4810
+
4811
+ check("struct S { int x; };\n" // #14700
4812
+ "int f(S* s) {\n"
4813
+ " return s->x ? 1 : 0;\n"
4814
+ "}\n");
4815
+ ASSERT_EQUALS("[test.cpp:2:10]: (style) Parameter 's' can be declared as pointer to const [constParameterPointer]\n", errout_str());
4816
}
4817
4818
void constArray() {
0 commit comments