ValueFlow::setTokenValue: Don't calculate parent value for uninitialized values
This commit is contained in:
parent
2f51b975ed
commit
a688402617
|
@ -256,6 +256,10 @@ static void setTokenValue(Token* tok, const ValueFlow::Value &value, const Setti
|
||||||
if (!tok->addValue(value))
|
if (!tok->addValue(value))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Don't set parent for uninitialized values
|
||||||
|
if (value.isUninit())
|
||||||
|
return;
|
||||||
|
|
||||||
Token *parent = const_cast<Token*>(tok->astParent());
|
Token *parent = const_cast<Token*>(tok->astParent());
|
||||||
if (!parent)
|
if (!parent)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue