MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / getInitialProgramState

Function getInitialProgramState

lib/programmemory.cpp:504–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502}
503
504static ProgramMemory getInitialProgramState(const Token* tok,
505 const Token* origin,
506 const Settings& settings,
507 const ProgramMemory::Map& vars = ProgramMemory::Map {})
508{
509 ProgramMemory pm;
510 if (origin) {
511 fillProgramMemoryFromConditions(pm, origin, settings);
512 const ProgramMemory state = pm;
513 fillProgramMemoryFromAssignments(pm, tok, settings, state, vars);
514 removeModifiedVars(pm, tok, origin, settings);
515 }
516 return pm;
517}
518
519ProgramMemoryState::ProgramMemoryState(const Settings& s) : settings(s)
520{}

Callers 1

getProgramMemoryFunction · 0.85

Calls 3

removeModifiedVarsFunction · 0.85

Tested by

no test coverage detected