Skip to content

Commit 185e56d

Browse files
committed
add test
1 parent 7fe105c commit 185e56d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/testsymboldatabase.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ class TestSymbolDatabase : public TestFixture {
424424
TEST_CASE(symboldatabase106);
425425
TEST_CASE(symboldatabase107);
426426
TEST_CASE(symboldatabase108);
427+
TEST_CASE(symboldatabase109); // #13553
427428

428429
TEST_CASE(createSymbolDatabaseFindAllScopes1);
429430
TEST_CASE(createSymbolDatabaseFindAllScopes2);
@@ -5710,6 +5711,18 @@ class TestSymbolDatabase : public TestFixture {
57105711
}
57115712
}
57125713

5714+
void symboldatabase109() { // #13553
5715+
GET_SYMBOL_DB("extern \"C\" {\n"
5716+
"class Base {\n"
5717+
"public:\n"
5718+
" virtual void show(void) = 0;\n"
5719+
"};\n"
5720+
"}\n");
5721+
const Token *f = db ? Token::findsimplematch(tokenizer.tokens(), "show") : nullptr;
5722+
ASSERT(f != nullptr);
5723+
ASSERT(f && f->function() && f->function()->hasVirtualSpecifier());
5724+
}
5725+
57135726
void createSymbolDatabaseFindAllScopes1() {
57145727
GET_SYMBOL_DB("void f() { union {int x; char *p;} a={0}; }");
57155728
ASSERT(db->scopeList.size() == 3);

0 commit comments

Comments
 (0)