File tree 1 file changed +15
-0
lines changed
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 {
5675
5675
ASSERT_EQUALS(3, db->scopeList.size());
5676
5676
ASSERT_EQUALS(Scope::ScopeType::eFor, db->scopeList.back().type);
5677
5677
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());
5678
5693
}
5679
5694
}
5680
5695
You can’t perform that action at this time.
0 commit comments