@@ -518,7 +518,8 @@ class TestSymbolDatabase : public TestFixture {
518518 TEST_CASE (findFunction52);
519519 TEST_CASE (findFunction53);
520520 TEST_CASE (findFunction54);
521- TEST_CASE (findFunction55); // #31004
521+ TEST_CASE (findFunction55); // #13004
522+ TEST_CASE (findFunction56);
522523 TEST_CASE (findFunctionRef1);
523524 TEST_CASE (findFunctionContainer);
524525 TEST_CASE (findFunctionExternC);
@@ -8330,6 +8331,17 @@ class TestSymbolDatabase : public TestFixture {
83308331 ASSERT (Token::simpleMatch (f->function ()->tokenDef , " f ( const Token * ptr ) ;" ));
83318332 }
83328333
8334+ void findFunction56 () { // #13125
8335+ GET_SYMBOL_DB (" void f(const char* fn, int i, const char e[], const std::string& a);\n "
8336+ " void f(const char* fn, int i, const char e[], const char a[]);\n "
8337+ " void g(const char x[], const std::string& s) {\n "
8338+ " f(\" abc\" , 65, x, s);\n "
8339+ " }\n " );
8340+ const Token* f = Token::findsimplematch (tokenizer.tokens (), " f ( \" abc\" " );
8341+ ASSERT (f && f->function ());
8342+ ASSERT_EQUALS (f->function ()->tokenDef ->linenr (), 1 );
8343+ }
8344+
83338345 void findFunctionRef1 () {
83348346 GET_SYMBOL_DB (" struct X {\n "
83358347 " const std::vector<int> getInts() const & { return mInts; }\n "
0 commit comments