Skip to content

Commit 51d0f12

Browse files
Add test for #10126 (#3568)
1 parent 593683a commit 51d0f12

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/testsymboldatabase.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ class TestSymbolDatabase : public TestFixture {
353353
TEST_CASE(symboldatabase93); // alignas attribute
354354
TEST_CASE(symboldatabase94); // structured bindings
355355
TEST_CASE(symboldatabase95); // #10295
356+
TEST_CASE(symboldatabase96); // #10126
356357

357358
TEST_CASE(createSymbolDatabaseFindAllScopes1);
358359
TEST_CASE(createSymbolDatabaseFindAllScopes2);
@@ -4807,6 +4808,14 @@ class TestSymbolDatabase : public TestFixture {
48074808
ASSERT(functok->function()->name() == "foo2");
48084809
}
48094810

4811+
void symboldatabase96() { // #10126
4812+
GET_SYMBOL_DB("struct A {\n"
4813+
" int i, j;\n"
4814+
"};\n"
4815+
"std::map<int, A> m{ { 0, A{0,0} }, {0, A{0,0} } };\n");
4816+
ASSERT_EQUALS("", errout.str());
4817+
}
4818+
48104819
void createSymbolDatabaseFindAllScopes1() {
48114820
GET_SYMBOL_DB("void f() { union {int x; char *p;} a={0}; }");
48124821
ASSERT(db->scopeList.size() == 3);

0 commit comments

Comments
 (0)