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

Function isOperator

lib/symboldatabase.cpp:2722–2730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2720}
2721
2722static bool isOperator(const Token *tokenDef)
2723{
2724 if (!tokenDef)
2725 return false;
2726 if (tokenDef->isOperatorKeyword())
2727 return true;
2728 const std::string &name = tokenDef->str();
2729 return name.size() > 8 && startsWith(name,"operator") && std::strchr("+-*/%&|~^<>!=[(", name[8]);
2730}
2731
2732static bool isTrailingReturnType(const Token* tok)
2733{

Callers 1

FunctionMethod · 0.70

Calls 3

startsWithFunction · 0.70
strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected