You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/testother.cpp
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4872,6 +4872,18 @@ class TestOther : public TestFixture {
4872
4872
" return *p->cbegin();\n"
4873
4873
"}\n");
4874
4874
ASSERT_EQUALS("[test.cpp:1:25]: (style) Parameter 'p' can be declared as pointer to const [constParameterPointer]\n", errout_str());
4875
+
4876
+
check("struct S : U {\n"
4877
+
"void f(int* p) const {\n"
4878
+
" if (m == p) {}\n"
4879
+
"}\n"
4880
+
"void g(int* p) final {\n"
4881
+
" if (m == p) {}\n"
4882
+
"}\n"
4883
+
"int* m;\n"
4884
+
"};\n");
4885
+
ASSERT_EQUALS("[test.cpp:2:13]: (style) Either there is a missing override/final keyword, or the parameter 'p' can be declared as pointer to const [constParameterPointer]\n",
0 commit comments