Checks that the Resuld is within the valid bound.
| 346 | |
| 347 | // Checks that the Resuld <id> is within the valid bound. |
| 348 | spv_result_t LimitCheckIdBound(ValidationState_t& _, const Instruction* inst) { |
| 349 | if (inst->id() >= _.getIdBound()) { |
| 350 | return _.diag(SPV_ERROR_INVALID_BINARY, inst) |
| 351 | << "Result <id> '" << inst->id() |
| 352 | << "' must be less than the ID bound '" << _.getIdBound() << "'."; |
| 353 | } |
| 354 | return SPV_SUCCESS; |
| 355 | } |
| 356 | |
| 357 | // Checks that the number of OpTypeStruct members is within the limit. |
| 358 | spv_result_t LimitCheckStruct(ValidationState_t& _, const Instruction* inst) { |
no test coverage detected