MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / GetLineNumber

Function GetLineNumber

testing/testrunner/coverage_index.cc:177–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177int32_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

Callers 1

WriteLCOVMethod · 0.85

Calls 3

line_offsetsMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected