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

Function containerPopsElement

lib/checkstl.cpp:94–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94static bool containerPopsElement(const Library::Container* container, const Token* parent)
95{
96 if (Token::Match(parent, ". %name% (")) {
97 const Library::Container::Action action = container->getAction(parent->strAt(1));
98 if (contains({ Library::Container::Action::POP }, action))
99 return true;
100 }
101 return false;
102}
103
104static const Token* getContainerIndex(const Library::Container* container, const Token* parent)
105{

Callers 1

outOfBoundsMethod · 0.85

Calls 2

containsFunction · 0.85
getActionMethod · 0.80

Tested by

no test coverage detected