| 
    Cppcheck
    
   | 
 
#include "config.h"#include "mathlib.h"#include "vfvalue.h"#include <cstddef>#include <functional>#include <map>#include <string>#include <unordered_map>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| struct | ExprIdToken | 
| struct | ExprIdToken::Hash | 
| struct | ProgramMemory | 
| struct | ProgramMemoryState | 
Functions | |
| std::vector< ValueFlow::Value > | execute (const Scope *scope, ProgramMemory &pm, const Settings &settings) | 
| void | execute (const Token *expr, ProgramMemory &programMemory, MathLib::bigint *result, bool *error, const Settings &settings) | 
| bool | conditionIsFalse (const Token *condition, ProgramMemory pm, const Settings &settings) | 
| Is condition always false when variable has given value?  More... | |
| bool | conditionIsTrue (const Token *condition, ProgramMemory pm, const Settings &settings) | 
| Is condition always true when variable has given value?  More... | |
| ProgramMemory | getProgramMemory (const Token *tok, const Token *expr, const ValueFlow::Value &value, const Settings &settings) | 
| Get program memory by looking backwards from given token.  More... | |
| ValueFlow::Value | evaluateLibraryFunction (const std::unordered_map< nonneg int, ValueFlow::Value > &args, const std::string &returnValue, const Settings &settings, bool cpp) | 
| bool conditionIsFalse | ( | const Token * | condition, | 
| ProgramMemory | pm, | ||
| const Settings & | settings | ||
| ) | 
Is condition always false when variable has given value?
| condition | top ast token in condition | 
| pm | program memory | 
Definition at line 211 of file programmemory.cpp.
References evaluateCondition().
Referenced by ValueFlowAnalyzer::evaluateInt(), fillProgramMemoryFromAssignments(), ProgramMemoryState::removeModifiedVars(), and valueFlowForLoopSimplify().
| bool conditionIsTrue | ( | const Token * | condition, | 
| ProgramMemory | pm, | ||
| const Settings & | settings | ||
| ) | 
Is condition always true when variable has given value?
| condition | top ast token in condition | 
| pm | program memory | 
Definition at line 216 of file programmemory.cpp.
References evaluateCondition().
Referenced by evalSameCondition(), ValueFlowAnalyzer::evaluateInt(), fillProgramMemoryFromAssignments(), ProgramMemoryState::removeModifiedVars(), and valueFlowForLoopSimplify().
| ValueFlow::Value evaluateLibraryFunction | ( | const std::unordered_map< nonneg int, ValueFlow::Value > & | args, | 
| const std::string & | returnValue, | ||
| const Settings & | settings, | ||
| bool | cpp | ||
| ) | 
Definition at line 1763 of file programmemory.cpp.
References createTokenFromExpression(), execute(), ProgramMemory::setValue(), and ValueFlow::Value::unknown().
Referenced by valueFlowLibraryFunction().
| std::vector<ValueFlow::Value> execute | ( | const Scope * | scope, | 
| ProgramMemory & | pm, | ||
| const Settings & | settings | ||
| ) | 
Definition at line 1757 of file programmemory.cpp.
| void execute | ( | const Token * | expr, | 
| ProgramMemory & | programMemory, | ||
| MathLib::bigint * | result, | ||
| bool * | error, | ||
| const Settings & | settings | ||
| ) | 
Definition at line 1792 of file programmemory.cpp.
References error, execute(), ValueFlow::Value::intvalue, ValueFlow::Value::isImpossible(), and ValueFlow::Value::isIntValue().
| ProgramMemory getProgramMemory | ( | const Token * | tok, | 
| const Token * | expr, | ||
| const ValueFlow::Value & | value, | ||
| const Settings & | settings | ||
| ) | 
Get program memory by looking backwards from given token.
Definition at line 539 of file programmemory.cpp.
References ValueFlow::Value::condition, fillProgramMemoryFromAssignments(), fillProgramMemoryFromConditions(), getInitialProgramState(), ProgramMemory::replace(), ProgramMemory::setValue(), and ValueFlow::Value::tokvalue.
Referenced by ValueFlowAnalyzer::evaluateInt(), and valueFlowForLoopSimplify().