File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -257,6 +257,7 @@ class TestGarbage : public TestFixture {
257257 TEST_CASE (garbageCode226);
258258 TEST_CASE (garbageCode227);
259259 TEST_CASE (garbageCode228);
260+ TEST_CASE (garbageCode229);
260261
261262 TEST_CASE (garbageCodeFuzzerClientMode1); // test cases created with the fuzzer client, mode 1
262263
@@ -1768,6 +1769,10 @@ class TestGarbage : public TestFixture {
17681769 ASSERT_NO_THROW (checkCode (" void f() { enum { A = [=]() mutable { return 0; }() }; }" ));
17691770 ASSERT_NO_THROW (checkCode (" enum { A = [=](void) mutable -> int { return 0; }() };" ));
17701771 }
1772+ void garbageCode229 () { // #14126
1773+ ASSERT_THROW_INTERNAL (checkCode (" void f() {} [[maybe_unused]]" ), SYNTAX);
1774+ }
1775+
17711776
17721777 void syntaxErrorFirstToken () {
17731778 ASSERT_THROW_INTERNAL (checkCode (" &operator(){[]};" ), SYNTAX); // #7818
You can’t perform that action at this time.
0 commit comments