MCPcopy Create free account
hub / github.com/csmith-project/csmith / OutputStandardFuncName

Function OutputStandardFuncName

src/FunctionInvocationBinary.cpp:269–297  ·  view source on GitHub ↗

* */

Source from the content-addressed store, hash-verified

267 *
268 */
269static void
270OutputStandardFuncName(eBinaryOps eFunc, std::ostream &out)
271{
272 switch (eFunc) {
273 // Math Ops
274 case eAdd: out << "+"; break;
275 case eSub: out << "-"; break;
276 case eMul: out << "*"; break;
277 case eDiv: out << "/"; break;
278 case eMod: out << "%"; break;
279
280 // Logical Ops
281 case eAnd: out << "&&"; break;
282 case eOr: out << "||"; break;
283 case eCmpEq: out << "=="; break;
284 case eCmpNe: out << "!="; break;
285 case eCmpGt: out << ">"; break;
286 case eCmpLt: out << "<"; break;
287 case eCmpLe: out << "<="; break;
288 case eCmpGe: out << ">="; break;
289
290 // Bitwise Ops
291 case eBitAnd: out << "&"; break;
292 case eBitOr: out << "|"; break;
293 case eBitXor: out << "^"; break;
294 case eLShift: out << "<<"; break;
295 case eRShift: out << ">>"; break;
296 }
297}
298
299std::string
300FunctionInvocationBinary::get_binop_string(eBinaryOps bop)

Callers 2

OutputMethod · 0.70
indented_outputMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected