Signed integer optimisation; ensure expr is variable
This commit is contained in:
parent
52491f1c53
commit
38aa0fa2f0
|
@ -254,7 +254,7 @@ void CheckType::checkIntegerOverflowOptimisations()
|
||||||
|
|
||||||
const Token *expr = lhs->astOperand1();
|
const Token *expr = lhs->astOperand1();
|
||||||
const Token *other = lhs->astOperand2();
|
const Token *other = lhs->astOperand2();
|
||||||
if (expr->varId() != lhs->astSibling()->varId())
|
if (expr->varId() == 0 || expr->varId() != lhs->astSibling()->varId())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// x [+-] c cmp x
|
// x [+-] c cmp x
|
||||||
|
|
Loading…
Reference in New Issue