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

Function isc_strConcat

lib/checkstl.cpp:1972–1984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1970}
1971
1972static bool isc_strConcat(const Token* tok)
1973{
1974 if (!tok->isBinaryOp() || !Token::simpleMatch(tok, "+"))
1975 return false;
1976 for (const Token* op : { tok->astOperand1(), tok->astOperand2() }) { // NOLINT(readability-use-anyofallof)
1977 const Token* sibling = op->astSibling();
1978 if (!sibling->valueType())
1979 continue;
1980 if (isc_strCall(op, sibling->valueType()->container))
1981 return true;
1982 }
1983 return false;
1984}
1985
1986static bool isc_strInPlusChain(const Token* tok, const Library::Container* container)
1987{

Callers 1

string_c_strMethod · 0.85

Calls 5

isc_strCallFunction · 0.85
isBinaryOpMethod · 0.80
astOperand1Method · 0.80
astOperand2Method · 0.80
simpleMatchFunction · 0.70

Tested by

no test coverage detected