| 770 | } |
| 771 | |
| 772 | void update(Token* tok, Action a, Direction d) override { |
| 773 | ValueFlow::Value* value = getValue(tok); |
| 774 | if (!value) |
| 775 | return; |
| 776 | ValueFlow::Value localValue; |
| 777 | if (a.isSymbolicMatch()) { |
| 778 | // Make a copy of the value to modify it |
| 779 | localValue = *value; |
| 780 | value = &localValue; |
| 781 | isSameSymbolicValue(tok, &localValue); |
| 782 | } |
| 783 | if (a.isInternal()) |
| 784 | internalUpdate(tok, *value, d); |
| 785 | // Read first when moving forward |
| 786 | if (d == Direction::Forward && a.isRead()) |
| 787 | setTokenValue(tok, *value, getSettings()); |
| 788 | if (a.isInconclusive()) |
| 789 | (void)lowerToInconclusive(); |
| 790 | if (a.isWrite() && tok->astParent()) { |
| 791 | writeValue(value, tok, d); |
| 792 | } |
| 793 | // Read last when moving in reverse |
| 794 | if (d == Direction::Reverse && a.isRead()) |
| 795 | setTokenValue(tok, *value, getSettings()); |
| 796 | } |
| 797 | |
| 798 | ValuePtr<Analyzer> reanalyze(Token* /*tok*/, const std::string& /*msg*/) const override { |
| 799 | return {}; |
no test coverage detected