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

Method getContainerYield

lib/library.cpp:1482–1496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1480}
1481
1482Library::Container::Yield Library::getContainerYield(const Token* const cond)
1483{
1484 if (Token::simpleMatch(cond, "(")) {
1485 const Token* tok = cond->astOperand1();
1486 if (tok && tok->str() == ".") {
1487 if (tok->astOperand1() && tok->astOperand1()->valueType()) {
1488 if (const Library::Container *container = tok->astOperand1()->valueType()->container) {
1489 if (tok->astOperand2())
1490 return container->getYield(tok->astOperand2()->str());
1491 }
1492 }
1493 }
1494 }
1495 return Library::Container::Yield::NO_YIELD;
1496}
1497
1498// returns true if ftok is not a library function
1499bool Library::isNotLibraryFunction(const Token *ftok, const Function **func) const

Callers

nothing calls this directly

Calls 5

astOperand1Method · 0.80
astOperand2Method · 0.80
getYieldMethod · 0.80
simpleMatchFunction · 0.70
strMethod · 0.45

Tested by

no test coverage detected