| 175 | } |
| 176 | |
| 177 | int32_t GetLineNumber(const cel::expr::SourceInfo& source_info, |
| 178 | int32_t offset) { |
| 179 | auto line_it = std::upper_bound(source_info.line_offsets().begin(), |
| 180 | source_info.line_offsets().end(), offset); |
| 181 | return std::distance(source_info.line_offsets().begin(), line_it) + 1; |
| 182 | } |
| 183 | |
| 184 | } // namespace |
| 185 |
no test coverage detected