SymbolDatabase: refactoring condition

This commit is contained in:
Daniel Marjamäki 2016-11-18 22:01:15 +01:00
parent 492d618653
commit 1235815ae9
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();