| 183 | } |
| 184 | |
| 185 | bool reaches(const Token * start, const Token * dest, ErrorPath* errorPath) |
| 186 | { |
| 187 | PathAnalysis::Info info = PathAnalysis{start}.forwardFind([&](const PathAnalysis::Info& i) { |
| 188 | return (i.tok == dest); |
| 189 | }); |
| 190 | if (!info.tok) |
| 191 | return false; |
| 192 | if (errorPath) |
| 193 | errorPath->insert(errorPath->end(), info.errorPath.cbegin(), info.errorPath.cend()); |
| 194 | return true; |
| 195 | } |
no test coverage detected