| 365 | } |
| 366 | |
| 367 | NoInputPtr |
| 368 | FuzzNoInputFactory::generate(std::shared_ptr<const Definition> Def) const { |
| 369 | assert(Def && "Unexpected Program State"); |
| 370 | |
| 371 | // TODO: Type_Unknown is not proper. |
| 372 | if (!Def->Filters.empty() || !Def->DataType) |
| 373 | return std::make_shared<FuzzNoInput>(FuzzNoInput::Type_Unknown, Def); |
| 374 | |
| 375 | if (Def->DataType->isFixedLengthArrayPtr() && Def->VarName.empty()) |
| 376 | return std::make_shared<FuzzNoInput>(FuzzNoInput::Type_NoNamedArray, Def); |
| 377 | |
| 378 | if (Def->FilePath && !Def->DataType->isStringType()) { |
| 379 | return std::make_shared<FuzzNoInput>(FuzzNoInput::Type_Unknown, Def); |
| 380 | } |
| 381 | |
| 382 | return nullptr; |
| 383 | } |
| 384 | |
| 385 | NoInputPtr FuzzNoInputFactory::generate(std::shared_ptr<const Definition> Def, |
| 386 | unsigned AffectedDefID) const { |
no test coverage detected