File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4664,6 +4664,24 @@ class TestOther : public TestFixture {
46644664 ASSERT_EQUALS("[test.cpp:1:18]: (style) Parameter 'p' can be declared as pointer to const [constParameterPointer]\n"
46654665 "[test.cpp:4:18]: (style) Parameter 'p' can be declared as pointer to const [constParameterPointer]\n",
46664666 errout_str());
4667+
4668+ check("class A {\n"
4669+ "public:\n"
4670+ " void func01(QPoint* pt1) {\n"
4671+ " if (nullptr == pt1) {}\n"
4672+ " }\n"
4673+ "};\n");
4674+ ASSERT_EQUALS("[test.cpp:3:25]: (style) Parameter 'pt1' can be declared as pointer to const [constParameterPointer]\n",
4675+ errout_str());
4676+
4677+ check("class B : public QObject {\n"
4678+ "public:\n"
4679+ " void func02(QPoint* pt2) {\n"
4680+ " if (nullptr == pt2) {}\n"
4681+ " }\n"
4682+ "};\n");
4683+ ASSERT_EQUALS("[test.cpp:3:25]: (style, inconclusive) Parameter 'pt2' can be declared as pointer to const [constParameterPointer]\n",
4684+ errout_str());
46674685 }
46684686
46694687 void constArray() {
You can’t perform that action at this time.
0 commit comments