GCC Code Coverage Report


Directory: ../
File: src/model/Struct.cpp
Date: 2025-10-27 22:48:14
Coverage Exec Excl Total
Lines: 100.0% 2 0 2
Functions: 100.0% 2 0 2
Branches: -% 0 0 0

Line Branch Exec Source
1 // Copyright (c) 2021-2025 ChilliBits. All rights reserved.
2
3 #include "Struct.h"
4
5 #include <ast/ASTNodes.h>
6
7 namespace spice::compiler {
8
9 /**
10 * Checks at least one field is a reference.
11 * This is used to prohibit constant instantiations.
12 *
13 * @return Has reference as field type or not
14 */
15 281 bool Struct::hasReferenceFields() const {
16 715 return std::ranges::any_of(fieldTypes, [](const QualType &fieldType) { return fieldType.isRef(); });
17 }
18
19 } // namespace spice::compiler
20