Skip to content

Commit

Permalink
Add more cases
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed May 20, 2024
1 parent 42fd14e commit 06fd7f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/astutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2441,13 +2441,13 @@ static bool isMutableExpression(const Token* tok)
return false;
if (tok->isLiteral() || tok->isKeyword() || tok->isStandardType() || tok->isEnumerator())
return false;
if (Token::Match(tok, ",|;|:"))
if (Token::Match(tok, ",|;|:|]|)|}"))
return false;
if (Token::simpleMatch(tok, "[ ]"))
return false;
if (Token::Match(tok->previous(), "%name% (") && tok->previous()->isKeyword())
return false;
if (Token::simpleMatch(tok, "<") && tok->link())
if (Token::Match(tok, "<|>") && tok->link())
return false;
if (Token::simpleMatch(tok, "[") && tok->astOperand1())
return isMutableExpression(tok->astOperand1());
Expand Down

0 comments on commit 06fd7f9

Please sign in to comment.