ExprEngine; Fix FP for BailoutValue

This commit is contained in:
Daniel Marjamäki 2020-01-19 09:10:50 +01:00
parent 3d1cb87a11
commit 16981f0813
1 changed files with 4 additions and 0 deletions

View File

@ -1824,6 +1824,10 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
float f = getKnownFloatValue(tok, 0.0f);
if (f > 0.0f || f < 0.0f)
return;
if (value.type == ExprEngine::ValueType::BailoutValue) {
if (Token::simpleMatch(tok->previous(), "sizeof ("))
return;
}
if (tok->astParent()->astOperand2() == tok && value.isEqual(dataBase, 0)) {
dataBase->addError(tok->linenr());
std::list<const Token*> callstack{tok->astParent()};