File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -4676,6 +4676,24 @@ class TestOther : public TestFixture {
46764676 ASSERT_EQUALS("[test.cpp:1:18]: (style) Parameter 'p' can be declared as pointer to const [constParameterPointer]\n"
46774677 "[test.cpp:4:18]: (style) Parameter 'p' can be declared as pointer to const [constParameterPointer]\n",
46784678 errout_str());
4679+
4680+ check("class A {\n"
4681+ "public:\n"
4682+ " void func01(QPoint* pt1) {\n"
4683+ " if (nullptr == pt1) {}\n"
4684+ " }\n"
4685+ "};\n");
4686+ ASSERT_EQUALS("[test.cpp:3:25]: (style) Parameter 'pt1' can be declared as pointer to const [constParameterPointer]\n",
4687+ errout_str());
4688+
4689+ check("class B : public QObject {\n"
4690+ "public:\n"
4691+ " void func02(QPoint* pt2) {\n"
4692+ " if (nullptr == pt2) {}\n"
4693+ " }\n"
4694+ "};\n");
4695+ ASSERT_EQUALS("[test.cpp:3:25]: (style, inconclusive) Parameter 'pt2' can be declared as pointer to const [constParameterPointer]\n",
4696+ errout_str());
46794697 }
46804698
46814699 void constArray() {
You can’t perform that action at this time.
0 commit comments