Cache and reuse value

This commit is contained in:
Dmitry-Me 2017-09-01 18:16:08 +03:00
parent 3b4f60fd21
commit 4663dc205a
1 changed files with 3 additions and 2 deletions

View File

@ -1995,8 +1995,9 @@ static bool isStdMoveOrStdForwarded(Token * tok, ValueFlow::Value::MoveKind * mo
static bool isOpenParenthesisMemberFunctionCallOfVarId(const Token * openParenthesisToken, unsigned int varId)
{
return Token::Match(openParenthesisToken->tokAt(-3),"%varid% . %name% (", varId) &&
openParenthesisToken->tokAt(-2)->originalName() == emptyString;
const Token * varTok = openParenthesisToken->tokAt(-3);
return Token::Match(varTok, "%varid% . %name% (", varId) &&
varTok->next()->originalName() == emptyString;
}
static const Token * nextAfterAstRightmostLeaf(Token const * tok)