We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52491f1 commit 38aa0faCopy full SHA for 38aa0fa
1 file changed
lib/checktype.cpp
@@ -254,7 +254,7 @@ void CheckType::checkIntegerOverflowOptimisations()
254
255
const Token *expr = lhs->astOperand1();
256
const Token *other = lhs->astOperand2();
257
- if (expr->varId() != lhs->astSibling()->varId())
+ if (expr->varId() == 0 || expr->varId() != lhs->astSibling()->varId())
258
continue;
259
260
// x [+-] c cmp x
0 commit comments