| 1571 | } |
| 1572 | |
| 1573 | Action isModified(const Token* tok) const override { |
| 1574 | // An iterator won't change the container size |
| 1575 | if (astIsIterator(tok)) |
| 1576 | return Action::Read; |
| 1577 | if (Token::Match(tok->astParent(), "%assign%") && astIsLHS(tok)) |
| 1578 | return Action::Invalid; |
| 1579 | if (isLikelyStreamRead(tok->astParent())) |
| 1580 | return Action::Invalid; |
| 1581 | if (astIsContainer(tok) && ValueFlow::isContainerSizeChanged(tok, getIndirect(tok), getSettings())) |
| 1582 | return Action::Read | Action::Invalid; |
| 1583 | return Action::Read; |
| 1584 | } |
| 1585 | }; |
| 1586 | |
| 1587 | static const Token* solveExprValue(const Token* expr, ValueFlow::Value& value) |
no test coverage detected