diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 7573bb2c42b..7b8e9b6f947 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -7166,6 +7166,8 @@ static const Token* parsedecl(const Token* type, !type->variable() && !type->function()) { bool isIterator = false; if (type->str() == "(") { + if (!Token::simpleMatch(type, "( *")) + break; if (Token::Match(type->link(), ") const| {")) break; if (par) diff --git a/test/testsymboldatabase.cpp b/test/testsymboldatabase.cpp index 70bca8111db..f3389e9a711 100644 --- a/test/testsymboldatabase.cpp +++ b/test/testsymboldatabase.cpp @@ -9141,6 +9141,7 @@ class TestSymbolDatabase : public TestFixture { ASSERT_EQUALS("s", typeOf("struct s { s foo(); s(int, int); }; s s::foo() { return s(1, 2); } ", "( 1 , 2 )")); // Some standard template functions.. TODO library configuration ASSERT_EQUALS("signed int &&", typeOf("std::move(5);", "( 5 )")); + ASSERT_EQUALS("signed int", typeOf("using F = int(int*); F* f; f(ptr);", "( ptr")); // #9792 // struct member.. ASSERT_EQUALS("signed int", typeOf("struct AB { int a; int b; } ab; x = ab.a;", "."));