ExprEngine; Fix FP for BailoutValue
This commit is contained in:
parent
3d1cb87a11
commit
16981f0813
|
@ -1824,6 +1824,10 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
|
||||||
float f = getKnownFloatValue(tok, 0.0f);
|
float f = getKnownFloatValue(tok, 0.0f);
|
||||||
if (f > 0.0f || f < 0.0f)
|
if (f > 0.0f || f < 0.0f)
|
||||||
return;
|
return;
|
||||||
|
if (value.type == ExprEngine::ValueType::BailoutValue) {
|
||||||
|
if (Token::simpleMatch(tok->previous(), "sizeof ("))
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (tok->astParent()->astOperand2() == tok && value.isEqual(dataBase, 0)) {
|
if (tok->astParent()->astOperand2() == tok && value.isEqual(dataBase, 0)) {
|
||||||
dataBase->addError(tok->linenr());
|
dataBase->addError(tok->linenr());
|
||||||
std::list<const Token*> callstack{tok->astParent()};
|
std::list<const Token*> callstack{tok->astParent()};
|
||||||
|
|
Loading…
Reference in New Issue