Skip to content

Commit 795041e

Browse files
Update checkmemoryleak.cpp
1 parent 84885d5 commit 795041e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checkmemoryleak.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ CheckMemoryLeak::AllocType CheckMemoryLeak::getAllocationType(const Token *tok2,
6464
tok2 = tok2->link();
6565
tok2 = tok2 ? tok2->next() : nullptr;
6666
}
67-
if (tok2 && tok2->isCpp() && tok2->isKeyword() && Token::simpleMatch(tok2->astParent(), "(") && tok2->astParent()->isCast())
67+
if (tok2 && tok2->isCpp() && tok2->isKeyword() && endsWith(tok2->str(), "_cast"))
6868
tok2 = tok2->astParent()->next();
6969
if (!tok2)
7070
return No;

0 commit comments

Comments
 (0)