MCPcopy Create free account
hub / github.com/Samsung/UTopia / copyMutationEnumType

Method copyMutationEnumType

lib/generation/ProtobufMutator.cpp:230–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230std::string ProtobufMutator::copyMutationEnumType(const Type &MutationType,
231 const FuzzInput &Input) {
232 assert(MutationType.isEnumType() && "Unexpected Program State");
233 auto LocalVarName = Input.getProtoVarName();
234 return SrcGenerator::genAssignStmt(
235 LocalVarName, "static_cast<" + MutationType.getTypeName() + ">(" +
236 getProtoVarVal(LocalVarName) + ")");
237}
238
239std::string ProtobufMutator::getProtoVarVal(const std::string &VarName) {
240 return DescriptorObjName + "." + VarName + "()";

Callers

nothing calls this directly

Calls 3

isEnumTypeMethod · 0.80
getProtoVarNameMethod · 0.80
getTypeNameMethod · 0.80

Tested by

no test coverage detected