Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jul 1, 2023
1 parent d64aef2 commit 5403446
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/testclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8440,6 +8440,15 @@ class TestClass : public TestFixture {
" void g() { f(); }\n"
"};");
ASSERT_EQUALS("", errout.str());

checkUselessOverride("struct B { virtual void f(); };\n" // #11808
"struct D : B { void f() override {} };\n"
"struct D2 : D {\n"
" void f() override {\n"
" Base::method();\n"
" }\n"
"};");
ASSERT_EQUALS("", errout.str());
}

#define checkUnsafeClassRefMember(code) checkUnsafeClassRefMember_(code, __FILE__, __LINE__)
Expand Down

0 comments on commit 5403446

Please sign in to comment.