* Fix hang on huge array * Fix another hang
This commit is contained in:
parent
238cf75f6f
commit
a32fb63443
|
@ -942,7 +942,7 @@ static void setTokenValue(Token* tok,
|
|||
if (Token::simpleMatch(parent, "-") && value2.bound == result.bound &&
|
||||
value2.bound != ValueFlow::Value::Bound::Point)
|
||||
result.invertBound();
|
||||
setTokenValue(parent, result, settings);
|
||||
setTokenValue(parent, result, settings, isInitList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1363,7 +1363,7 @@ static void valueFlowNumber(TokenList *tokenlist, const Settings* settings)
|
|||
bool isInitList = false;
|
||||
const Token* endInit{};
|
||||
for (Token *tok = tokenlist->front(); tok;) {
|
||||
if (!isInitList && tok->str() == "{" && Token::simpleMatch(tok->astOperand1(), ",")) {
|
||||
if (!isInitList && tok->str() == "{" && (Token::simpleMatch(tok->astOperand1(), ",") || Token::simpleMatch(tok->astOperand2(), ","))) {
|
||||
isInitList = true;
|
||||
endInit = tok->link();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue