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

Method safe_ops

src/FunctionInvocationBinary.cpp:150–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148///////////////////////////////////////////////////////////////////////////////
149
150bool
151FunctionInvocationBinary::safe_ops(eBinaryOps op)
152{
153 switch(op) {
154 case eAdd:
155 case eSub:
156 case eMul:
157 case eMod:
158 case eDiv:
159 case eLShift:
160 case eRShift:
161 return true;
162 default:
163 return false;
164 }
165}
166
167/* do some constant folding */
168bool

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected