Skip to content

Commit 72a9b13

Browse files
committed
fixed infinite loops on certain inputs
1 parent 1f99cf0 commit 72a9b13

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checkleakautovar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ static const Token * isAnonymousFunctionCall(const Token * tok)
294294
if (tok->previous()->str() == "(" && !tok->previous()->isBinaryOp() &&
295295
tok->linkAt(-1) && !tok->isStandardType()) {
296296
tok = tok->linkAt(-1)->next();
297-
} else if (!tok->isStandardType() && tok->isName() && tok->linkAt(1)) {
297+
} else if (!tok->isStandardType() && tok->isName() && tok->next()->str() == "(") {
298298
tok = tok->linkAt(1)->next();
299299
} else {
300300
return nullptr;

0 commit comments

Comments
 (0)