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

Method equals

src/FunctionInvocationUnary.cpp:159–173  ·  view source on GitHub ↗

do some constant folding */

Source from the content-addressed store, hash-verified

157
158/* do some constant folding */
159bool
160FunctionInvocationUnary::equals(int num) const
161{
162 assert(!param_value.empty());
163 if (num == 0 && eFunc == eNot && param_value[0]->not_equals(0)) {
164 return true;
165 }
166 if (num == 1 && eFunc == eNot && param_value[0]->equals(0)) {
167 return true;
168 }
169 if (eFunc == eMinus && param_value[0]->equals(num * -1)) {
170 return true;
171 }
172 return false;
173}
174
175///////////////////////////////////////////////////////////////////////////////
176

Callers

nothing calls this directly

Calls 1

not_equalsMethod · 0.45

Tested by

no test coverage detected