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

daisytuner / sdfglib / 20770413849

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

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

75.0
/src/types/pointer.cpp
1
#include "sdfg/types/pointer.h"
2

3
namespace sdfg {
4
namespace types {
5

6
Pointer::Pointer() : pointee_type_(std::nullopt) {};
145✔
7

8
Pointer::Pointer(const IType& pointee_type) : pointee_type_(pointee_type.clone()) {};
389✔
9

10
Pointer::Pointer(StorageType storage_type, size_t alignment, const std::string& initializer)
11
    : IType(storage_type, alignment, initializer), pointee_type_(std::nullopt) {};
312✔
12

13
Pointer::Pointer(StorageType storage_type, size_t alignment, const std::string& initializer, const IType& pointee_type)
14
    : IType(storage_type, alignment, initializer), pointee_type_(pointee_type.clone()) {};
1,403✔
15

16
bool Pointer::has_pointee_type() const { return this->pointee_type_.has_value(); };
3,348✔
17

18
std::unique_ptr<IType> Pointer::clone() const {
1,688✔
19
    if (this->has_pointee_type()) {
1,688✔
20
        return std::make_unique<
1,377✔
21
            Pointer>(this->storage_type(), this->alignment(), this->initializer(), *this->pointee_type_.value());
1,377✔
22
    } else {
1,377✔
23
        return std::make_unique<Pointer>(this->storage_type(), this->alignment(), this->initializer());
311✔
24
    }
311✔
25
};
1,688✔
26

27
TypeID Pointer::type_id() const { return TypeID::Pointer; };
2,031✔
28

29
PrimitiveType Pointer::primitive_type() const {
132✔
30
    if (this->has_pointee_type()) {
132✔
31
        return this->pointee_type_.value()->primitive_type();
126✔
32
    } else {
126✔
33
        return PrimitiveType::Void;
6✔
34
    }
6✔
35
};
132✔
36

37
bool Pointer::is_symbol() const { return true; };
650✔
38

39
const IType& Pointer::pointee_type() const { return *this->pointee_type_.value(); };
1,510✔
40

41
bool Pointer::operator==(const IType& other) const {
58✔
42
    if (auto pointer_type = dynamic_cast<const Pointer*>(&other)) {
58✔
43
        if (this->has_pointee_type() != pointer_type->has_pointee_type()) {
58✔
44
            return false;
×
45
        }
×
46
        if (this->has_pointee_type()) {
58✔
47
            return *(this->pointee_type_.value()) == *pointer_type->pointee_type_.value();
55✔
48
        } else {
55✔
49
            return true;
3✔
50
        }
3✔
51
    } else {
58✔
52
        return false;
×
53
    }
×
54
};
58✔
55

56
std::string Pointer::print() const {
×
57
    if (this->has_pointee_type()) {
×
58
        return "Pointer(" + this->pointee_type_.value()->print() + ")";
×
59
    } else {
×
60
        return "Pointer()";
×
61
    }
×
62
};
×
63

64
} // namespace types
65
} // 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