Merge pull request #781 from Dmitry-Me/mutuallyExclusiveConditions

These conditions are mutually exclusive
This commit is contained in:
Dmitry-Me 2016-03-03 22:09:04 +03:00
commit 2b1ff6df28
1 changed files with 1 additions and 1 deletions

View File

@ -1652,7 +1652,7 @@ static void valueFlowAfterCondition(TokenList *tokenlist, SymbolDatabase* symbol
tokens.push(const_cast<Token*>(rhstok->astOperand2()));
if (rhstok->varId() == varid)
setTokenValue(rhstok, values.front());
if (Token::Match(rhstok, "++|--|=") && Token::Match(rhstok->astOperand1(), "%varid%", varid)) {
else if (Token::Match(rhstok, "++|--|=") && Token::Match(rhstok->astOperand1(), "%varid%", varid)) {
assign = true;
break;
}