Skip to content

Commit 202b0ba

Browse files
Update testclass.cpp
1 parent 23827f6 commit 202b0ba

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

test/testclass.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6785,6 +6785,22 @@ class TestClass : public TestFixture {
67856785
" B::g(0);\n"
67866786
"}\n");
67876787
ASSERT_EQUALS("", errout_str());
6788+
6789+
checkConst("struct S {\n" // #14366
6790+
" void f();\n"
6791+
"};\n"
6792+
"struct T : U {\n"
6793+
" void g(S* s) {\n"
6794+
" s->f();\n"
6795+
" }\n"
6796+
" void h() {\n"
6797+
" S s;\n"
6798+
" s.f();\n"
6799+
" }\n"
6800+
"};\n");
6801+
ASSERT_EQUALS("[test.cpp:5:10]: (style) Either there is a missing 'override', or the member function 'T::g' can be static. [functionStatic]\n"
6802+
"[test.cpp:8:10]: (style) Either there is a missing 'override', or the member function 'T::h' can be static. [functionStatic]\n",
6803+
errout_str());
67886804
}
67896805

67906806
void const97() { // #13301

0 commit comments

Comments
 (0)