| 189 | } |
| 190 | |
| 191 | std::pair<TerminationFinder::ControlFlow, size_t> TerminationFinder::firstUnconditionalControlFlowChange( |
| 192 | std::vector<Statement> const& _statements |
| 193 | ) |
| 194 | { |
| 195 | for (size_t i = 0; i < _statements.size(); ++i) |
| 196 | { |
| 197 | ControlFlow controlFlow = controlFlowKind(_statements[i]); |
| 198 | if (controlFlow != ControlFlow::FlowOut) |
| 199 | return {controlFlow, i}; |
| 200 | } |
| 201 | return {ControlFlow::FlowOut, std::numeric_limits<size_t>::max()}; |
| 202 | } |
| 203 | |
| 204 | TerminationFinder::ControlFlow TerminationFinder::controlFlowKind(Statement const& _statement) |
| 205 | { |