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

Method SelectParentParam

src/VariableSelector.cpp:1058–1072  ·  view source on GitHub ↗

--------------------------------------------------------------

Source from the content-addressed store, hash-verified

1056
1057// --------------------------------------------------------------
1058Variable *
1059VariableSelector::SelectParentParam(Effect::Access access,
1060 const CGContext &cg_context,
1061 const Type* type,
1062 const CVQualifiers* qfer,
1063 eMatchType mt,
1064 const vector<const Variable*>& invalid_vars)
1065{
1066 Function &parent = *cg_context.get_current_func();
1067 if (parent.param.empty())
1068 return SelectParentLocal(access, cg_context, type, qfer, mt, invalid_vars);
1069 Variable* var = choose_var(parent.param, access, cg_context, type, qfer, mt, invalid_vars);
1070 ERROR_GUARD(NULL);
1071 return var ? var : SelectParentLocal(access, cg_context, type, qfer, mt, invalid_vars);
1072}
1073
1074// --------------------------------------------------------------
1075Variable *

Callers

nothing calls this directly

Calls 1

get_current_funcMethod · 0.80

Tested by

no test coverage detected