Skip to content
Snippets Groups Projects
Commit 58836880 authored by Martin Geisler's avatar Martin Geisler
Browse files

pdl: fix computation of `SourceLocation` line numbers

Before, we would always exit the loop at the first iteration since the
`line_starts` passed in start with a zero offset. We should actually
search through the line starts to find the last line which starts
before the given offset.

This also adds new unit tests to cover this.

Test: atest pdl_inline_tests
Change-Id: I171803822c3cb58deec167a2bc063cbd8f99110f
parent 8d26041b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment