@@ -308,6 +308,7 @@ class TestSymbolDatabase: public TestFixture {
308308 TEST_CASE (symboldatabase81); // #9411
309309 TEST_CASE (symboldatabase82);
310310 TEST_CASE (symboldatabase83); // #9431
311+ TEST_CASE (symboldatabase84);
311312
312313 TEST_CASE (createSymbolDatabaseFindAllScopes1);
313314
@@ -4442,6 +4443,41 @@ class TestSymbolDatabase: public TestFixture {
44424443 ASSERT_EQUALS (" " , errout.str ());
44434444 }
44444445
4446+ void symboldatabase84 () {
4447+ {
4448+ const bool old = settings1.debugwarnings ;
4449+ settings1.debugwarnings = true ;
4450+ GET_SYMBOL_DB (" struct a { a() noexcept(false); };\n "
4451+ " a::a() noexcept(false) = default;" );
4452+ settings1.debugwarnings = old;
4453+ const Scope *scope = db->findScopeByName (" a" );
4454+ ASSERT (scope);
4455+ ASSERT (scope->functionList .size () == 1 );
4456+ ASSERT (scope->functionList .front ().name () == " a" );
4457+ ASSERT (scope->functionList .front ().hasBody () == false );
4458+ ASSERT (scope->functionList .front ().isConstructor () == true );
4459+ ASSERT (scope->functionList .front ().isDefault () == true );
4460+ ASSERT (scope->functionList .front ().isNoExcept () == false );
4461+ ASSERT_EQUALS (" " , errout.str ());
4462+ }
4463+ {
4464+ const bool old = settings1.debugwarnings ;
4465+ settings1.debugwarnings = true ;
4466+ GET_SYMBOL_DB (" struct a { a() noexcept(true); };\n "
4467+ " a::a() noexcept(true) = default;" );
4468+ settings1.debugwarnings = old;
4469+ const Scope *scope = db->findScopeByName (" a" );
4470+ ASSERT (scope);
4471+ ASSERT (scope->functionList .size () == 1 );
4472+ ASSERT (scope->functionList .front ().name () == " a" );
4473+ ASSERT (scope->functionList .front ().hasBody () == false );
4474+ ASSERT (scope->functionList .front ().isConstructor () == true );
4475+ ASSERT (scope->functionList .front ().isDefault () == true );
4476+ ASSERT (scope->functionList .front ().isNoExcept () == true );
4477+ ASSERT_EQUALS (" " , errout.str ());
4478+ }
4479+ }
4480+
44454481 void createSymbolDatabaseFindAllScopes1 () {
44464482 GET_SYMBOL_DB (" void f() { union {int x; char *p;} a={0}; }" );
44474483 ASSERT (db->scopeList .size () == 3 );
0 commit comments