This commit is contained in:
chrchr-github 2021-11-17 19:28:15 +01:00 committed by GitHub
parent 593683ab69
commit 51d0f128a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -353,6 +353,7 @@ private:
TEST_CASE(symboldatabase93); // alignas attribute
TEST_CASE(symboldatabase94); // structured bindings
TEST_CASE(symboldatabase95); // #10295
TEST_CASE(symboldatabase96); // #10126
TEST_CASE(createSymbolDatabaseFindAllScopes1);
TEST_CASE(createSymbolDatabaseFindAllScopes2);
@ -4807,6 +4808,14 @@ private:
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);