SymbolDatabase: refactoring condition
This commit is contained in:
parent
492d618653
commit
1235815ae9
|
@ -1389,8 +1389,7 @@ bool SymbolDatabase::isFunction(const Token *tok, const Scope* outerScope, const
|
||||||
|
|
||||||
// regular function?
|
// regular function?
|
||||||
else if (Token::Match(tok, "%name% (") && !isReservedName(tok->str()) && tok->previous() &&
|
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
|
(Token::Match(tok->previous(), "%name%|>|&|*|::|~") || // Either a return type or scope qualifier in front of tok
|
||||||
tok->strAt(-1) == "::" || tok->strAt(-1) == "~" || // or a scope qualifier in front of tok
|
|
||||||
outerScope->isClassOrStruct())) { // or a ctor/dtor
|
outerScope->isClassOrStruct())) { // or a ctor/dtor
|
||||||
const Token* tok1 = tok->previous();
|
const Token* tok1 = tok->previous();
|
||||||
const Token* tok2 = tok->next()->link()->next();
|
const Token* tok2 = tok->next()->link()->next();
|
||||||
|
|
Loading…
Reference in New Issue