| 40 | } |
| 41 | |
| 42 | bool ValidateConstructSize(ConstructType type, size_t size) { |
| 43 | switch (type) { |
| 44 | case ConstructType::kSelection: |
| 45 | return size == 0; |
| 46 | case ConstructType::kContinue: |
| 47 | return size == 1; |
| 48 | case ConstructType::kLoop: |
| 49 | return size == 1; |
| 50 | case ConstructType::kCase: |
| 51 | return size >= 1; |
| 52 | default: |
| 53 | assert(1 == 0 && "Type not defined"); |
| 54 | } |
| 55 | return false; |
| 56 | } |
| 57 | |
| 58 | void Construct::set_corresponding_constructs( |
| 59 | std::vector<Construct*> constructs) { |
no outgoing calls
no test coverage detected