-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
My .gcno files get transformed into .gcov files that end up looking like the following:
-: 99:
-: 100:template <typename T>
#####: 101:void times2(T x) {
#####: 102: return 2*x;
-: 103:}
------------------
debugsymbolA:
-: 100:template <typename T>
#####: 101:void times2(T x) {
#####: 102: return 2*x;
-: 103:}
------------------
debugsymbolB:
-: 100:template <typename T>
#####: 101:void times2(T x) {
#####: 102: return 2*x;
-: 103:}
------------------
-: 104:
The times2 function is templated and listed several times with the different debug symbol identifiers.
cpp-coveralls simply appends a new element to its coverage array for each line, so the lines 100-103 are counted 3 times each, which causes a shift in the reported lines (and they end up going "off the end" of the file contents because it is now larger than the number of lines in the file). This makes all the coverage lines after this inconsistent and unreliable (and also undetectable to the typical user reading the report).
Metadata
Metadata
Assignees
Labels
No labels