| 225 | } |
| 226 | |
| 227 | void UTModify::generateFuzzVarGlobalSetters( |
| 228 | std::map<std::string, std::vector<GlobalVarSetter>> &Setters, |
| 229 | const FuzzInput &Input) const { |
| 230 | const auto &Def = Input.getDef(); |
| 231 | if (Def.Declaration != Definition::DeclType_Global) |
| 232 | return; |
| 233 | |
| 234 | auto Path = Def.Path; |
| 235 | auto FuncName = util::getAssignGlobalFuncName(Input.getFuzzVarName()); |
| 236 | auto FuncBody = util::getIndent(1) + generateAssignStatement(Input); |
| 237 | UTModify::GlobalVarSetter Setter = {FuncName, FuncBody}; |
| 238 | auto Iter = Setters.find(Path); |
| 239 | if (Iter == Setters.end()) { |
| 240 | Setters.emplace(Path, std::vector<UTModify::GlobalVarSetter>({Setter})); |
| 241 | return; |
| 242 | } |
| 243 | Iter->second.emplace_back(Setter); |
| 244 | } |
| 245 | |
| 246 | void UTModify::generateFuzzVarReplacements(const FuzzInput &Input) { |
| 247 | const auto &Def = Input.getDef(); |
nothing calls this directly
no test coverage detected