| 607 | } |
| 608 | |
| 609 | ProgramMemory getProgramMemory(const Token* tok, const Token* expr, const ValueFlow::Value& value, const Settings& settings) |
| 610 | { |
| 611 | ProgramMemory programMemory; |
| 612 | programMemory.replace(getInitialProgramState(tok, value.tokvalue, settings)); |
| 613 | programMemory.replace(getInitialProgramState(tok, value.condition, settings)); |
| 614 | fillProgramMemoryFromConditions(programMemory, tok, settings); |
| 615 | programMemory.setValue(expr, value); |
| 616 | const ProgramMemory state = programMemory; |
| 617 | fillProgramMemoryFromAssignments(programMemory, tok, settings, state, {{expr, value}}); |
| 618 | return programMemory; |
| 619 | } |
| 620 | |
| 621 | static bool isNumericValue(const ValueFlow::Value& value) { |
| 622 | return value.isIntValue() || value.isFloatValue(); |
no test coverage detected