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

daisytuner / docc / 27981272983

22 Jun 2026 08:18PM UTC coverage: 61.754% (-0.03%) from 61.782%
27981272983

Pull #781

github

web-flow
Merge bddaa3724 into fe87d162b
Pull Request #781: Extend Segformer benchmarks setup

987 of 1432 new or added lines in 62 files covered. (68.92%)

9 existing lines in 7 files now uncovered.

38121 of 61730 relevant lines covered (61.75%)

993.19 hits per line

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

31.25
/sdfg/src/structured_control_flow/return.cpp
1
#include "sdfg/structured_control_flow/return.h"
2

3
#include "sdfg/function.h"
4
#include "sdfg/types/type.h"
5

6
namespace sdfg {
7
namespace structured_control_flow {
8

9
Return::Return(size_t element_id, const DebugInfo& debug_info, ControlFlowNode* parent, const std::string& data)
10
    : ControlFlowNode(element_id, debug_info, parent), data_(data), type_(nullptr) {}
56✔
11

12
Return::Return(
13
    size_t element_id,
14
    const DebugInfo& debug_info,
15
    ControlFlowNode* parent,
16
    const std::string& data,
17
    const types::IType& type
18
)
19
    : ControlFlowNode(element_id, debug_info, parent), data_(data), type_(type.clone()) {}
×
20

21

22
const std::string& Return::data() const { return data_; }
116✔
23

24
const types::IType& Return::type() const { return *type_; }
×
25

26
bool Return::is_data() const { return type_ == nullptr; }
99✔
27

28
bool Return::is_constant() const { return type_ != nullptr; }
4✔
29

30
void Return::validate(const Function& function) const {
57✔
31
    if (is_data()) {
57✔
32
        if (data_ != "" && !function.exists(data_)) {
57✔
33
            throw InvalidSDFGException("Return node with data '" + data_ + "' does not correspond to any container");
×
34
        }
×
35
        if (type_ != nullptr) {
57✔
36
            throw InvalidSDFGException("Return node with data cannot have a type");
×
37
        }
×
38
    } else if (is_constant()) {
57✔
39
        if (function.exists(data_)) {
×
40
            throw InvalidSDFGException(
×
41
                "Return node with constant data '" + data_ + "' cannot correspond to any container"
×
42
            );
×
43
        }
×
44
        if (type_ == nullptr) {
×
45
            throw InvalidSDFGException("Return node with constant data must have a type");
×
46
        }
×
47
    } else {
×
48
        throw InvalidSDFGException("Return node must be either data or constant");
×
49
    }
×
50
};
57✔
51

52
void Return::replace(const symbolic::Expression old_expression, const symbolic::Expression new_expression) {
×
53
    if (is_data() && data_ == old_expression->__str__()) {
×
54
        data_ = new_expression->__str__();
×
55
    }
×
NEW
56
}
×
57

58
} // namespace structured_control_flow
59
} // 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