CheckUninitVar: Use isLikelyStreamRead

This commit is contained in:
Daniel Marjamäki 2018-04-22 17:04:54 +02:00
parent cc4977e140
commit fba8208134
1 changed files with 1 additions and 1 deletions

View File

@ -1110,7 +1110,7 @@ bool CheckUninitVar::isMemberVariableAssignment(const Token *tok, const std::str
return true;
else if (Token::Match(tok->tokAt(-2), "[(,=] &"))
return true;
else if (Token::Match(tok->tokAt(-2), "%name% >>") && Token::Match(tok->tokAt(3), ";|>>")) // #6680
else if (isLikelyStreamRead(_tokenizer->isCPP(), tok->previous()))
return true;
else if ((tok->previous() && tok->previous()->isConstOp()) || Token::Match(tok->previous(), "[|="))
; // member variable usage