| 
    Cppcheck
    
   | 
 
#include <programmemory.h>
Public Member Functions | |
| ProgramMemoryState (const Settings *s) | |
| void | insert (const ProgramMemory &pm, const Token *origin=nullptr) | 
| void | replace (ProgramMemory pm, const Token *origin=nullptr) | 
| void | addState (const Token *tok, const ProgramMemory::Map &vars) | 
| void | assume (const Token *tok, bool b, bool isEmpty=false) | 
| void | removeModifiedVars (const Token *tok) | 
| ProgramMemory | get (const Token *tok, const Token *ctx, const ProgramMemory::Map &vars) const | 
Public Attributes | |
| ProgramMemory | state | 
| std::map< nonneg int, const Token * > | origins | 
| const Settings * | settings | 
Definition at line 164 of file programmemory.h.
      
  | 
  explicit | 
Definition at line 442 of file programmemory.cpp.
References settings.
| void ProgramMemoryState::addState | ( | const Token * | tok, | 
| const ProgramMemory::Map & | vars | ||
| ) | 
Definition at line 471 of file programmemory.cpp.
References addVars(), fillProgramMemoryFromAssignments(), fillProgramMemoryFromConditions(), replace(), settings, and state.
Referenced by ValueFlowAnalyzer::assume(), get(), and ValueFlowAnalyzer::updateState().
| void ProgramMemoryState::assume | ( | const Token * | tok, | 
| bool | b, | ||
| bool | isEmpty = false  | 
        ||
| ) | 
Definition at line 482 of file programmemory.cpp.
References Token::astParent(), Token::astTop(), Token::link(), Token::Match(), Token::previous(), programMemoryParseCondition(), replace(), ProgramMemory::setContainerSizeValue(), settings, Token::simpleMatch(), and state.
Referenced by ValueFlowAnalyzer::assume().
| ProgramMemory ProgramMemoryState::get | ( | const Token * | tok, | 
| const Token * | ctx, | ||
| const ProgramMemory::Map & | vars | ||
| ) | const | 
Definition at line 521 of file programmemory.cpp.
References addState(), precedes(), previousBeforeAstLeftmostLeaf(), removeModifiedVars(), and state.
Referenced by ValueFlowAnalyzer::evaluate().
| void ProgramMemoryState::insert | ( | const ProgramMemory & | pm, | 
| const Token * | origin = nullptr  | 
        ||
| ) | 
Definition at line 447 of file programmemory.cpp.
References ProgramMemory::insert(), origins, and state.
| void ProgramMemoryState::removeModifiedVars | ( | const Token * | tok | ) | 
Definition at line 500 of file programmemory.cpp.
References conditionIsFalse(), conditionIsTrue(), ProgramMemory::erase_if(), findExpressionChangedSkipDeadCode(), ExprIdToken::getExpressionId(), origins, settings, state, and ExprIdToken::tok.
Referenced by ValueFlowAnalyzer::assume(), get(), and ValueFlowAnalyzer::updateState().
| void ProgramMemoryState::replace | ( | ProgramMemory | pm, | 
| const Token * | origin = nullptr  | 
        ||
| ) | 
Definition at line 455 of file programmemory.cpp.
References origins, ProgramMemory::replace(), and state.
Referenced by addState(), and assume().
Definition at line 166 of file programmemory.h.
Referenced by insert(), removeModifiedVars(), and replace().
| const Settings* ProgramMemoryState::settings | 
Definition at line 167 of file programmemory.h.
Referenced by addState(), assume(), ProgramMemoryState(), and removeModifiedVars().
| ProgramMemory ProgramMemoryState::state | 
Definition at line 165 of file programmemory.h.
Referenced by addState(), assume(), get(), insert(), removeModifiedVars(), and replace().