SymbolDatabase: refactoring condition

This commit is contained in:
Daniel Marjamäki 2016-11-17 22:20:01 +01:00
parent a05f833843
commit 5d7a4d51ad
1 changed files with 1 additions and 2 deletions

View File

@ -1389,8 +1389,7 @@ bool SymbolDatabase::isFunction(const Token *tok, const Scope* outerScope, const
// regular function?
else if (Token::Match(tok, "%name% (") && !isReservedName(tok->str()) && tok->previous() &&
(tok->previous()->isName() || tok->strAt(-1) == ">" || tok->strAt(-1) == "&" || tok->strAt(-1) == "*" || // Either a return type in front of tok
tok->strAt(-1) == "::" || tok->strAt(-1) == "~" || // or a scope qualifier in front of tok
(Token::Match(tok->previous(), "%name%|>|&|*|::|~") || // Either a return type or scope qualifier in front of tok
outerScope->isClassOrStruct())) { // or a ctor/dtor
const Token* tok1 = tok->previous();
const Token* tok2 = tok->next()->link()->next();