• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

daisytuner / sdfglib / 20764569418

06 Jan 2026 10:50PM UTC coverage: 62.168% (+21.4%) from 40.764%
20764569418

push

github

web-flow
Merge pull request #433 from daisytuner/clang-coverage

updates clang coverage flags

14988 of 24109 relevant lines covered (62.17%)

88.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.86
/src/element.cpp
1
#include "sdfg/element.h"
2

3
namespace sdfg {
4

5
DebugInfo::DebugInfo()
6
    : filename_(), function_(), start_line_(0), start_column_(0), end_line_(0), end_column_(0), has_(false) {
6,858✔
7

8
      };
6,858✔
9

10
DebugInfo::DebugInfo(std::string filename, size_t start_line, size_t start_column, size_t end_line, size_t end_column)
11
    : filename_(filename), function_(), start_line_(start_line), start_column_(start_column), end_line_(end_line),
11✔
12
      end_column_(end_column), has_(true) {
11✔
13

14
      };
11✔
15

16
DebugInfo::DebugInfo(
17
    std::string filename, std::string function, size_t start_line, size_t start_column, size_t end_line, size_t end_column
18
)
19
    : filename_(filename), function_(function), start_line_(start_line), start_column_(start_column),
3✔
20
      end_line_(end_line), end_column_(end_column), has_(true) {
3✔
21

22
      };
3✔
23

24

25
bool DebugInfo::has() const { return this->has_; };
413✔
26

27
std::string DebugInfo::filename() const { return this->filename_; };
300✔
28

29
std::string DebugInfo::function() const { return this->function_; };
291✔
30

31
size_t DebugInfo::start_line() const { return this->start_line_; };
294✔
32

33
size_t DebugInfo::start_column() const { return this->start_column_; };
294✔
34

35
size_t DebugInfo::end_line() const { return this->end_line_; };
293✔
36

37
size_t DebugInfo::end_column() const { return this->end_column_; };
293✔
38

39
DebugInfo DebugInfo::merge(const DebugInfo& left, const DebugInfo& right) {
110✔
40
    if (!left.has()) {
110✔
41
        return right;
100✔
42
    }
100✔
43
    if (!right.has()) {
10✔
44
        return left;
7✔
45
    }
7✔
46
    if (left.filename() != right.filename()) {
3✔
47
        return left;
×
48
    }
×
49
    if (left.function() != right.function() && left.function() != "" && right.function() != "") {
3✔
50
        return left;
×
51
    }
×
52

53
    size_t start_line = 0;
3✔
54
    size_t start_column = 0;
3✔
55
    size_t end_line = 0;
3✔
56
    size_t end_column = 0;
3✔
57

58
    if (left.start_line_ < right.start_line_) {
3✔
59
        start_line = left.start_line_;
1✔
60
        start_column = left.start_column_;
1✔
61
    } else {
2✔
62
        start_line = right.start_line_;
2✔
63
        start_column = right.start_column_;
2✔
64
    }
2✔
65

66
    if (left.end_line_ > right.end_line_) {
3✔
67
        end_line = left.end_line_;
2✔
68
        end_column = left.end_column_;
2✔
69
    } else {
2✔
70
        end_line = right.end_line_;
1✔
71
        end_column = right.end_column_;
1✔
72
    }
1✔
73

74
    std::string function = left.function_;
3✔
75
    if (left.function_ == "") {
3✔
76
        function = right.function_;
3✔
77
    }
3✔
78

79
    return DebugInfo(left.filename_, function, start_line, start_column, end_line, end_column);
3✔
80
};
3✔
81

82
Element::Element(size_t element_id, const DebugInfo& debug_info) : element_id_(element_id), debug_info_(debug_info) {};
10,530✔
83

84
size_t Element::element_id() const { return this->element_id_; };
5,592✔
85

86
const DebugInfo& Element::debug_info() const { return this->debug_info_; };
1,635✔
87

88
void Element::set_debug_info(const DebugInfo& debug_info) { this->debug_info_ = debug_info; };
7✔
89

90
} // namespace sdfg
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc