@@ -1288,53 +1288,6 @@ bool SymbolDatabase::isFunction(const Token *tok, const Scope* outerScope, const
12881288 (tok->previous ()->isName () || tok->strAt (-1 ) == " >" || tok->strAt (-1 ) == " &" || tok->strAt (-1 ) == " *" || // Either a return type in front of tok
12891289 tok->strAt (-1 ) == " ::" || tok->strAt (-1 ) == " ~" || // or a scope qualifier in front of tok
12901290 outerScope->isClassOrStruct ())) { // or a ctor/dtor
1291-
1292- const Token* tok1 = tok->previous ();
1293-
1294- // skip over destructor "~"
1295- if (tok1->str () == " ~" )
1296- tok1 = tok1->previous ();
1297-
1298- // skip over qualification
1299- while (Token::simpleMatch (tok1, " ::" )) {
1300- if (Token::Match (tok1->tokAt (-1 ), " %name%" ))
1301- tok1 = tok1->tokAt (-2 );
1302- else
1303- tok1 = tok1->tokAt (-1 );
1304- }
1305-
1306- // skip over pointers and references
1307- while (Token::Match (tok1, " [*&]" ))
1308- tok1 = tok1->tokAt (-1 );
1309-
1310- // skip over template
1311- if (tok1 && tok1->str () == " >" )
1312- tok1 = tok1->link ()->previous ();
1313-
1314- // function can't have number or variable as return type
1315- if (tok1 && (tok1->isNumber () || tok1->varId ()))
1316- return false ;
1317-
1318- // skip over return type
1319- if (Token::Match (tok1, " %name%" ))
1320- tok1 = tok1->previous ();
1321-
1322- // skip over qualification
1323- while (Token::simpleMatch (tok1, " ::" )) {
1324- if (Token::Match (tok1->tokAt (-1 ), " %name%" ))
1325- tok1 = tok1->tokAt (-2 );
1326- else
1327- tok1 = tok1->tokAt (-1 );
1328- }
1329-
1330- // skip over modifiers and other stuff
1331- while (Token::Match (tok1, " const|static|extern|template|virtual|struct|class" ))
1332- tok1 = tok1->previous ();
1333-
1334- // should be at a sequence point if this is a function
1335- if (!Token::Match (tok1, " >|{|}|;|public:|protected:|private:" ) && tok1)
1336- return false ;
1337-
13381291 const Token* tok2 = tok->next ()->link ()->next ();
13391292 if (tok2 &&
13401293 (Token::Match (tok2, " const| ;|{|=" ) ||
0 commit comments