We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23827f6 commit 202b0baCopy full SHA for 202b0ba
1 file changed
test/testclass.cpp
@@ -6785,6 +6785,22 @@ class TestClass : public TestFixture {
6785
" B::g(0);\n"
6786
"}\n");
6787
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
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());
6804
}
6805
6806
void const97() { // #13301
0 commit comments