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

Function isc_strInPlusChain

lib/checkstl.cpp:1986–2001  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1984}
1985
1986static bool isc_strInPlusChain(const Token* tok, const Library::Container* container)
1987{
1988 if (!tok || !tok->valueType() || !tok->valueType()->pointer)
1989 return false;
1990 bool result = false;
1991 visitAstNodes(tok, [&](const Token* tok2) {
1992 if (Token::simpleMatch(tok2, "+"))
1993 return ChildrenToVisit::op1_and_op2;
1994 if (isc_strCall(tok2, container)) {
1995 result = true;
1996 return ChildrenToVisit::done;
1997 }
1998 return ChildrenToVisit::none;
1999 });
2000 return result;
2001}
2002
2003static bool isc_strAssignment(const Token* tok)
2004{

Callers 1

isc_strConstructorFunction · 0.85

Calls 3

visitAstNodesFunction · 0.85
isc_strCallFunction · 0.85
simpleMatchFunction · 0.70

Tested by

no test coverage detected