Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test/testsymboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ class TestSymbolDatabase : public TestFixture {
TEST_CASE(symboldatabase93); // alignas attribute
TEST_CASE(symboldatabase94); // structured bindings
TEST_CASE(symboldatabase95); // #10295
TEST_CASE(symboldatabase96); // #10126

TEST_CASE(createSymbolDatabaseFindAllScopes1);
TEST_CASE(createSymbolDatabaseFindAllScopes2);
Expand Down Expand Up @@ -4794,6 +4795,14 @@ class TestSymbolDatabase : public TestFixture {
ASSERT(functok->function()->name() == "foo2");
}

void symboldatabase96() { // #10126
GET_SYMBOL_DB("struct A {\n"
" int i, j;\n"
"};\n"
"std::map<int, A> m{ { 0, A{0,0} }, {0, A{0,0} } };\n");
ASSERT_EQUALS("", errout.str());
}

void createSymbolDatabaseFindAllScopes1() {
GET_SYMBOL_DB("void f() { union {int x; char *p;} a={0}; }");
ASSERT(db->scopeList.size() == 3);
Expand Down