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

Function isAlternativeBinaryOp

externals/simplecpp/simplecpp.cpp:158–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158static bool isAlternativeBinaryOp(const simplecpp::Token *tok, const std::string &alt)
159{
160 return (tok->name &&
161 tok->str() == alt &&
162 tok->previous &&
163 tok->next &&
164 (tok->previous->number || tok->previous->name || tok->previous->op == ')') &&
165 (tok->next->number || tok->next->name || tok->next->op == '('));
166}
167
168static bool isAlternativeUnaryOp(const simplecpp::Token *tok, const std::string &alt)
169{

Callers 5

constFoldComparisonMethod · 0.85
constFoldBitwiseMethod · 0.85
constFoldLogicalOpMethod · 0.85
simplifyNameFunction · 0.85

Calls 1

strMethod · 0.45

Tested by

no test coverage detected