| 48 | namespace ValueFlow |
| 49 | { |
| 50 | static Library::Container::Yield getContainerYield(Token* tok, const Library& library, Token*& parent) |
| 51 | { |
| 52 | if (Token::Match(tok, ". %name% (") && tok->astParent() == tok->tokAt(2) && tok->astOperand1() && |
| 53 | tok->astOperand1()->valueType()) { |
| 54 | const Library::Container* c = getLibraryContainer(tok->astOperand1()); |
| 55 | parent = tok->astParent(); |
| 56 | return c ? c->getYield(tok->strAt(1)) : Library::Container::Yield::NO_YIELD; |
| 57 | } |
| 58 | if (Token::Match(tok->previous(), "%name% (")) { |
| 59 | parent = tok; |
| 60 | if (const Library::Function* f = library.getFunction(tok->previous())) { |
| 61 | return f->containerYield; |
| 62 | } |
| 63 | } |
| 64 | return Library::Container::Yield::NO_YIELD; |
| 65 | } |
| 66 | |
| 67 | static Value truncateImplicitConversion(Token* parent, const Value& value, const Settings& settings) |
| 68 | { |
no test coverage detected