Skip to content

Commit bdac846

Browse files
Update testclass.cpp
1 parent 0dbf1f1 commit bdac846

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

test/testclass.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6731,6 +6731,7 @@ class TestClass : public TestFixture {
67316731
"struct S<0> {};\n"
67326732
"struct D : S<150> {};\n");
67336733
// don't hang
6734+
ignore_errout();
67346735
}
67356736

67366737
void const93() { // #12162
@@ -6801,6 +6802,20 @@ class TestClass : public TestFixture {
68016802
ASSERT_EQUALS("[test.cpp:5:10]: (style) Either there is a missing 'override', or the member function 'T::g' can be static. [functionStatic]\n"
68026803
"[test.cpp:8:10]: (style) Either there is a missing 'override', or the member function 'T::h' can be static. [functionStatic]\n",
68036804
errout_str());
6805+
6806+
checkConst("enum E { E0 };\n"
6807+
"int f();\n"
6808+
"struct S : U {\n"
6809+
" E g() {\n"
6810+
" return E0;\n"
6811+
" }\n"
6812+
" int h() {\n"
6813+
" return f();\n"
6814+
" }\n"
6815+
"};\n");
6816+
ASSERT_EQUALS("[test.cpp:4:7]: (style) Either there is a missing 'override', or the member function 'S::g' can be static. [functionStatic]\n"
6817+
"[test.cpp:7:9]: (style) Either there is a missing 'override', or the member function 'S::h' can be static. [functionStatic]\n",
6818+
errout_str());
68046819
}
68056820

68066821
void const97() { // #13301

0 commit comments

Comments
 (0)