Skip to content

Commit

Permalink
Update testsymboldatabase.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored Sep 27, 2024
1 parent 74acd87 commit fc7b0ed
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/testsymboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,8 @@ class TestSymbolDatabase : public TestFixture {
TEST_CASE(findFunction52);
TEST_CASE(findFunction53);
TEST_CASE(findFunction54);
TEST_CASE(findFunction55); // #31004
TEST_CASE(findFunction55); // #13004
TEST_CASE(findFunction56);
TEST_CASE(findFunctionRef1);
TEST_CASE(findFunctionContainer);
TEST_CASE(findFunctionExternC);
Expand Down Expand Up @@ -8330,6 +8331,17 @@ class TestSymbolDatabase : public TestFixture {
ASSERT(Token::simpleMatch(f->function()->tokenDef, "f ( const Token * ptr ) ;"));
}

void findFunction56() { // #13125
GET_SYMBOL_DB("void f(const char* fn, int i, const char e[], const std::string& a);\n"
"void f(const char* fn, int i, const char e[], const char a[]);\n"
"void g(const char x[], const std::string& s) {\n"
" f(\"abc\", 65, x, s);\n"
"}\n");
const Token* f = Token::findsimplematch(tokenizer.tokens(), "f ( \"abc\"");
ASSERT(f && f->function());
ASSERT_EQUALS(f->function()->tokenDef->linenr(), 1);
}

void findFunctionRef1() {
GET_SYMBOL_DB("struct X {\n"
" const std::vector<int> getInts() const & { return mInts; }\n"
Expand Down

0 comments on commit fc7b0ed

Please sign in to comment.