| 469 | } |
| 470 | |
| 471 | bool HigherMinimum(const OpDef::AttrDef& old_attr, |
| 472 | const OpDef::AttrDef& new_attr) { |
| 473 | // Anything -> no restriction : not more restrictive. |
| 474 | if (!new_attr.has_minimum()) return false; |
| 475 | // No restriction -> restriction : more restrictive. |
| 476 | if (!old_attr.has_minimum()) return true; |
| 477 | // If anything that was previously allowed is no longer allowed: |
| 478 | // more restrictive. |
| 479 | return new_attr.minimum() > old_attr.minimum(); |
| 480 | } |
| 481 | |
| 482 | string MinStr(const OpDef::AttrDef& attr) { |
| 483 | if (!attr.has_minimum()) return "no minimum"; |
no test coverage detected