File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -5675,6 +5675,21 @@ class TestSymbolDatabase : public TestFixture {
56755675 ASSERT_EQUALS(3, db->scopeList.size());
56765676 ASSERT_EQUALS(Scope::ScopeType::eFor, db->scopeList.back().type);
56775677 ASSERT_EQUALS(1, db->scopeList.back().varlist.size());
5678+ ASSERT_EQUALS("i", db->scopeList.back().varlist.back().name());
5679+ }
5680+ {
5681+ GET_SYMBOL_DB_DBG("void bar(int) {}\n" // #9960
5682+ "void foo() {\n"
5683+ " std::vector<int*> a(10);\n"
5684+ " for (int i = 0; i < 10; i++)\n"
5685+ " bar(*a[4]);\n"
5686+ "}\n");
5687+ ASSERT(db != nullptr);
5688+ ASSERT_EQUALS("", errout_str());
5689+ ASSERT_EQUALS(4, db->scopeList.size());
5690+ ASSERT_EQUALS(Scope::ScopeType::eFor, db->scopeList.back().type);
5691+ ASSERT_EQUALS(1, db->scopeList.back().varlist.size());
5692+ ASSERT_EQUALS("i", db->scopeList.back().varlist.back().name());
56785693 }
56795694 }
56805695
You can’t perform that action at this time.
0 commit comments