diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 41d99055f45..14e7ece42ad 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -1107,7 +1107,7 @@ void SymbolDatabase::createSymbolDatabaseSetFunctionPointers(bool firstPass) continue; bool isTemplateArg = false; - if (tok->next()->str() != "(") { + if (!Token::Match(tok->next(), "(|{")) { const Token *start = tok; while (Token::Match(start->tokAt(-2), "%name% ::")) start = start->tokAt(-2); diff --git a/test/testclass.cpp b/test/testclass.cpp index 53371d545c3..f79744666c7 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -6061,7 +6061,7 @@ class TestClass : public TestFixture { " int i{};\n" " S f() { return S{ &i }; }\n" "};\n"); - TODO_ASSERT_EQUALS("[test.cpp:7]: (style, inconclusive) Technically the member function 'C::f' can be const.\n", "", errout.str()); + ASSERT_EQUALS("[test.cpp:7]: (style, inconclusive) Technically the member function 'C::f' can be const.\n", errout.str()); checkConst("struct S {\n" " explicit S(const int* p) : mp(p) {}\n"