Commit a3cedc0
committed
handle lcov end line number
According to the lcov documentation, `FN` field can contain optional
end line number.
Right now the code crashes in this case.
This commit makes sure it doesn't and it's well parsed.
Ref: https://manpages.ubuntu.com/manpages/noble/man1/geninfo.1.html
```
Following is a list of line numbers for each function name found in the source file:
FN:<line number of function start>,(<line number of function end>,)?<function name>
The 'end' line number is optional, and is generated only if the compiler/toolchain version
is recent enough to generate the data (e.g., gcc 9 or newer).
```1 parent 900877e commit a3cedc0
File tree
3 files changed
+36
-2
lines changed- test/functional
- expected_results
3 files changed
+36
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
809 | | - | |
| 809 | + | |
| 810 | + | |
810 | 811 | | |
811 | | - | |
| 812 | + | |
812 | 813 | | |
813 | 814 | | |
814 | 815 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
| |||
0 commit comments