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

Function isTryEmplace

lib/valueflow.cpp:3221–3227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3219}
3220
3221static bool isTryEmplace(const Token* tok)
3222{
3223 if (tok->str() != "(" || !Token::simpleMatch(tok->astOperand1(), ".") || !tok->astOperand1()->astOperand1() || !Token::simpleMatch(tok->astOperand1()->astOperand2(), "try_emplace"))
3224 return false;
3225 const ValueType* vt = tok->astOperand1()->astOperand1()->valueType();
3226 return vt && vt->container && vt->container->stdAssociativeLike;
3227}
3228
3229static void valueFlowAfterMove(const TokenList& tokenlist, const SymbolDatabase& symboldatabase, ErrorLogger& errorLogger, const Settings& settings)
3230{

Callers 1

valueFlowAfterMoveFunction · 0.85

Calls 4

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

Tested by

no test coverage detected