value flow: changed astparent lookup

This commit is contained in:
Daniel Marjamäki 2014-01-11 12:47:47 +01:00
parent 02b92efd1a
commit 225001a45c
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ static void valueFlowBeforeCondition(TokenList *tokenlist, ErrorLogger *errorLog
}
// skip if variable is conditionally used in ?: expression.
const Token *parent = tok2->astParent();
const Token *parent = tok2;
while (parent && !Token::Match(parent, "%oror%|&&|?|:")) {
while (Token::Match(parent->astParent(), "%oror%|&&|?") &&
parent->astParent()->astOperand1() == parent)