Skip to content

Commit

Permalink
Update checkstring.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored Sep 11, 2024
1 parent 2251a68 commit c3671ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/checkstring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,11 @@ void CheckString::strPlusCharError(const Token *tok)
static bool isMacroUsage(const Token* tok)
{
if (const Token* parent = tok->astParent()) {
while (parent && (parent->isCast() || parent->str() == "&&"))
while (parent && (parent->isCast() || parent->str() == "&&")) {
if (parent->isExpandedMacro())
return true;
parent = parent->astParent();
}
if (!parent)
return false;
if (parent->isExpandedMacro())
Expand Down

0 comments on commit c3671ae

Please sign in to comment.